Upvote:3
You mistake service length (25 years, in this case) with time served in a certain rank (5 years, here).
Times have changed, but to become a general officer takes a lot of time, practice and experience. Usually more than 20 years. On the military cursus honorum * one has to serve in each rank a certain number of years, before being promoted to the next rank. One simply cannot become general within those 25 years. (Unless one is - in this period - of noble birth, has connections, etc.)
In many armies today the break point is the rank of major. It's relatively easy to become lieutenant and captain. The next step is far more difficult. Only a few captains make it to major. Many captains remain in that rank until they retire or resign (depends very much on the period - this is general).
The next big hurdle is from colonel to general. Only a few colonels are promoted to general. Again, many colonels (pending time period) remain colonel or resign if they are passed over for promotion.
Assume 2-10 years in each rank. 2 ranks of lieutenant, captain, major, ltn-col, col, brig-gen. Add that up: you'll need those 25 years to become general.
*= cursus honorom here is the usual path for promotion