I believe you are wrong about that. There is no law in Belize that prohibits it, to my knowledge.
Credit card issuers do generally prohibit it in the U.S., but not necessarily outside the U.S. Also, there are apparently ways to set this up, I think as a discount for cash, as long as it is applied across the board, so that it meets the requirements of the credit card issuers.
This has been rehashed many times here and elsewhere.
Many hotels still do levy a surcharge in Belize for credit card use, though the practice is less common than it used to be.
I too think it is a bad practice, from a marketing point of view if nothing else. It almost always leaves a bad taste in the mouths of guests.
I can understand why hotel operators and others do it, as so many of them are struggling and operating on thin margins, but in general I think from a marketing point of view it is better to price the product to include the cost of credit card transaction fees averaged over all transactions (cash and credit). This means a slight increase in prices and it also means that cash payers pay a little more than they would otherwise, and so in that sense it is unfair, but it's better marketing.