My understanding is that the top ranked graduates have first pick of assignments. I had heard that during the Viet Nam War, bottom ranked graduates pretty much got front line infantry, which I expect would be more dangerous than, say, a Pentagon posting. If true, this does seem like quite an incentive for good study habits.
This doesn't really answer your question, but infantry is one of the most competitive branches (along with aviation and military intelligence) for all commissioning sources (ROTC, West Point, and OCS). Many top cadets select it as their first choice. West Point is the only commissioning source that slots officers based purely on order of merit; the other two have mechanisms for dispersing talent to the less popular branches.
Source: ROTC grad and MI officer.