Okay well ignoring your example there are plenty of things you can put in a contract and have it be completely ignored in a court of law for being unreasonable. That's extremely common and gets brought up a lot when people talk about eulas.But the Federal Government does make contracts like this for service members, employees of 3 letter agencies, and federal agents. Once you sign a federal contract, your life is the government's to own until your contract is up. Everything about your life is theirs. This includes how your family acts and what your family can and cannot do.
Yet everyone WILLINGLY signs these contracts do so despite knowing all this. Sure some realize it's not for them and try everything to bail out but their lives are going to be shit regardless.
Contracts from the FEDERAL GOVERNMENT OF THE UNITED STATES OF AMERICA are a little different and should be treated as such as a relatively benign "pro sports" contract, especially about their free time. It's not really relative at all.