“I have no problem with this.”
You have problems in your thinking. Your social engineering is right in line with the liberal agenda
Ships and bases are workplaces.
Your employer has clear Constitutional rights to limit certain activities within the workplace.
If you dislike your employer’s rules, you are completely free to look for a new job or start your own business.
Or, if you disagree with the Constitution and the Supreme Court, you are completely free to file a new lawsuit, or seek a Constitutional Amendment, or run for president and nominate your own Supreme Court judges.
That’s not a liberal solution.
That’s a Libertarian solution.