There are two considerations to this, which are formally the issue. The enforcement of them (if any) varies, depending on country you are from and country you are traveling to.
Hotel cancellation as proof of invalid application
Schengen visa can be revoked if you cancel the hotel booking, submitted with application. This had just made news recently here (Ukraine) by becoming a little more common for us lately.
The reason for it is primarily people using “easy” countries to get visa to get into “hard” countries. Canceling your hotel can be interpreted to indicate you never intended to travel to the country you applied for (regardless of it being Schengen visa).
The recommendation (as covered by news) is to email embassy about changes like that in advance.
Hotel registering your stay with authorities
I hadn't looked into it extensively, but to my knowledge plenty countries require visitors to register with authorities for anything but very short stay.
This is typically handled by hotels, which is (in part?) why in some countries they require your passport presented for check in.
If you have alternate accommodations you might be legally obliged to report your stay yourself.
I don't think this is particularly strictly enforced, but it is also a consideration.