We have a professional Air Force. It's not uncommon to see e.g. F-16 pilots "retire" into senior management roles. These are smart, ambitious people. If you want to keep it that way, you give them a say in the planes they fly.
Then, your ranking in the class drives when it's your turn to pick. Along with some other criteria. For example, some aircraft have min/max pilot height criteria because of the ejection seat. So some pilots do end up flying aircraft they didn't really want to fly.
Similarly, in the British Army, all soldiers go through basic training and then choose a particular military 'trade' (e.g. infantry, armour, artillery, etc). They receive trade-specific training before joining a relevant unit. Some regiments even have 'father and son' social events where an officer joined the same regiment that his father did.
The Royal Navy has similar career personal-choice progression routes for weapons officers, engineers, etc.