See: https://en.wikipedia.org/wiki/The_class_the_stars_fell_on
Being a semi-competent officer with some experience basically guaranteed that you’d be fast tracked to a senior command.
e.g. Grant left the military in 1854 and was just a captain when the war started. In about 4 months he was already a brigadier general
Being at the top of your cohort from the beginning has a number of advantages. Your name is known from the very start. Big things are expected and big opportunities are presented. There is probably a very strong personal commitment to a military career by those bothering to achieve top scores, and not being a career captain, but aiming for colonel or above.
Being the top of the class also puts a person on a track that is even promotable to the very top. A 2nd lieutenant supply officer just isn't on the same trajectory as a high profile infantry officer commanding a forwardly deploy combat unit.