Most World War II drafts and enlistments were "For the Duration" of the conflict. Once the war ended, political pressure to bring as many of the troops home as possible became very intense. Demobilization priority was determined with a complicated point system (i.e. time in service, any medals won and all kinds of stuff earned points and whoever had more points got the first ship home). Aside from homesickness, troops clamored to get home because it was believed that the sooner you were stateside the better your job prospects would be as the economy reverted to civilian production.
As you can imagine, political lobbying about getting home quickly became very intense. People wrote their congressmen, soldiers held protests, and the Senate forced Eisenhower to testify about the process. The tumultuous process was widely perceived as impairing occupation policy in both Germany and Japan. Groups without much political clout, like African American servicemen, generally got worse treatment for demobilization.
The logistical effort to bring troops back to the US was huge and very prolonged. The last official demobilization transports didn't reach the states until April 1946, almost 8 months after the end of the war.
Various inducements were offered for troops to extend their service overseas, like transport for their families, or long leaves so servicemen could tour Europe while waiting for their ship.