100% compulsory to pay, 0% compulsory to actually attend
Comes up time and time again with Westerners visiting Thailand/Cambodia, I'm sure all hotel staff are used to, and immune from, all the arguments to get out of it.
I agree if you were in the US, UK, etc it would be legally dubious and they would struggle to get away with it. Accept that this is Thailand/Cambodia, the legal systems to protect consumers are less developed, it's widespread local custom, and move on.