In the world I'm creating, there is an empire that has stretched until it's taken over the world, in large part due to it's ability to effectively fight back against very dangerous monsters that are present in the world and seem to be multiplying. Uterine replicator technology is present in this futuristic world and it is very common for couples to have children by this method. It is also the law that all members of the empire must donated semen/eggs when they have reached adulthood. These genetic materials are used to create the military of the empire.
These children are raised together in large cohorts and overtime have developed into a self-segregated endogamous class. They grow up together and tend to form romantic relationships with members of other military cohorts. These cohorts have men and women in the same proportion as the rest of the world. Their education is not substantially different from what your average citizen receives growing up, besides the addition of military strategy/history and martial arts. Once they reach adulthood, they become full fledged members of the military until they are 53, at which point they can retire. While it is not illegal for non-cohort citizens to join the military, it has become less common as the cohort system became more and more prominent. In addition, they don't tend to move far past the enlisted stage, with cohort members filling the bulk of the officer class of the military.
In this world, genetic modifications are possible, but very, very rare, making the members of this cohort baseline humans like the rest of my world. While this world is futuristic, space exploration does not yet exist. The story would take place entirely on this planet, which is not Earth but is earth-like in terms of climate/geography.
My question is, what would be a logical reason for the empire to spend time and money to raise these children this way?