Exactly, the training was provided at no cost and the government is entitled to decide how it gets used.
The training wasn't provided at no cost. That's what the Return of Service obligation is for. The training was exchanged for a term of someone's life, and with an accepted risk that it may be fatal.