That's just not true. You can absolutely have terms of service that are illegal, and the government can enforce them.