This is because the hotel needs to ensure the quality of room reservation and service, and paying the room fee in advance can ensure the stability of room reservation and hotel operation.
If you need to cancel your reservation, you can follow the hotel's cancellation policy. In general, it takes a certain amount of time to cancel your reservation, and a cancellation fee may be charged.