It seems to be enforced by the credit card companies and processors, who likely charge more to process transactions for companies that involve pornography. (Probably due to the spurious chargebacks.)
Visa's issues with religious fundamentalists started in the Tipper Gore days. During the Bush presidency it was nearly impossible for a porn site to get a US payment processor.
Every government does this.
Who are an unofficial arm of the US government. https://en.wikipedia.org/wiki/Operation_Choke_Point