And yes, governments can warn of risks without outlawing activities. E.g. the U.S. State Department warns of dangerous areas to travel to on its website all the time, but they don't prevent you from traveling there.
I dont believe that the US government can ban a citizens travel, to include international travel, due to the interpretation of the US constitition and the 5th amendment. (Broadly applied public health policies not withstanding)
Additionally the safety of another country may be difficult to ascertain depending on how freely the press is allowed to operate within that country.
So this is a space that it is beneficial for the government to get involved.
A simple google search brings up the risks of snorkeling. The third link is a state of Hawaii has a snorkeling safety website that google says has been last updated in 2021 of I’m reading the info correctly. On that page there is a (albeit very short/minimal) warning that recent air travel may increase the risk of injury when snorkeling.
I’ll admit I have no idea if that website was as prominent on google six months ago. But it did exist.