I live in Israel. I am not sure, but I think it is the only country in the world in which scubadiving is regulated by state law
The law passed in the parliament back in the 60s. Following a few cases of diving accidents, a group of lobbyists who had commercial interest in regulating all scuba activities managed to convince some legislators that if the government won't take action there will be lots of fatalities etc. At that time, scuba was considered an extreme dangerous activity and the law passed.
So, a government "scubadiving authority" was established which was also the certifying agency, and also in charge of forcing the law. This authority, how surprisingly, was composed from the lobbyist that I've mentioned. This "scuba authority" established many regulations some of them may be perceived "good" and others seem a little odd and nowadays they just appear anachronistic.
Among these regulations are things like the obligation of certain scuba equipment that divers MUST carry. For example, the law states that a diver MUST carry a BCD. Now, if you dive in the summer, with only swimsuit and an AL tank you don't really need a BCD whatsoever, but the law says you must.
Thus, MonkeyDiving is actually illegal in our waters, as well a solo diving, or diving without the "proper" gear that is listed in the law.
And it goes on, such as insurance obligation, the permission to dive only if a valid dive in the logbook within 6 months (for OW and AOW divers) etc. etc.
Then, this authority have some "rangers" or "scuba police" which are supposed also to make sure the air compressors in dive clubs is well maintained, make sure divers are diving "in accordance with the law" and there have been cases in which they made summons to divers "for an investigation" or tried to confiscate c-cards from divers.
As you can see, dive clubs are extremely afraid of this scuba police because they can shut down the operation for a couple of months etc, so they are quite zealous of making sure everything a diver does is according the law, so if you come alone to fill your tanks, some dive ops will refuse before you show them a legitimate dive buddy. Yep, "Habeas buddy". I had several occasions in which I was refused this elementary service even if I was really diving with a buddy which was coming from another town already with his own private tank, and they would hear about it...
What's funny, that I completely agree with you that swimming is by far more dangerous and there are by far more fatalities while swimming in the sea (and pools), lots of bike accidents, people dying while trekking in our desert etc. etc. but nobody even dares to dream on trying pass a law that forces the people to take "bike riding **" courses, dictate what equipment a trekker must have when he goes backpacking in the desert, or force a swimmer to have a "guided refresh swim" if he fails to prove that he has been swimming within the past six months.. But we are stuck with the stupid "scuba law".
But hey, you'll also find lots of dumb laws in the US
for example, in Alabama it is illegal to sell peanuts after sundown (on Wednesdays) or to wear a fake mustache that causes laugher in church... Or, did you know that in Texas it is forbidden to take more than three sips of beer at a time while standing??? In some countries it is forbidden to step on currency notes with the image of the dictator (probably very relevant nowadays in Libia).
And, if you've mentioned bathtubs, did you know in LA it is not legal to bathe two babies at the same time in the same tub???