In practice, the Secretary of War determined which particular units were sent where although the President could of course overrule him. The Secretary would be wise to rely upon the guidance of the General in Chief in such matters. In the event of a dispute, the Secretary was all but certain to prevail since it was he and not the GiC who had the legal authority to move troops.
As to why a particular unit was assigned to a particular department, that was substantially determined by geography. States usually sent newly raised regiments to the battle area that was closest to them. Units raised in say, New York or Pennsylvania were deployed in the Eastern theater as they were in close proximity to Virginia and the Atlantic seaboard. States in the interior like Ohio and Illinois sent men to the Western theater. It would have made little sense to do otherwise.
Of course, that was a general rule of thumb, and exceptions did occur. When warm bodies were needed in some theater undergoing a crisis, transfers from other theaters could and did occur which is why we see states sending regiments to widely separated departments. I don't think there was really a concerted effort by the War Department to see to it that every state was represented in every theater. Perhaps someone else could chime in on that angle.
Politics also played a part in these deployments which is why the defense of Washington was seemingly prioritized above all other concerns for much of the time, and Lincoln occasionally pursued somewhat chimerical adventures like the Red River expedition that contributed little or nothing to Union victory. This too could not be otherwise since war, as Clausewitz tells us, is only the extension of politics with the addition of other means.