It is not the hotels, who charge it, but governments, most often the municipality. Usually there is no obligation to hide that from the guest or include it in the price. Just to pay. You can also go pay it straight in the town hall, the hotel is just doing you a favor.