Some localities call it a civil code, but I think it is uniform commercial code, where I live, being the rooms are rented for purposes of commerce.
Most states adopt some form of commercial or civil code to avoid price gouging, and one requirement is a maximum daily rate shall be posted in a conspicuous location, AND that rate shall be set at a prescribed schedule based upon the services & amenities offered by the hotel, so a Motel 6 is not going to charge like the Ritz Carlton.
Not posting these rates should also be a violation to the civil/commercial code, and at that point the fee would be assumed to be ZERO dollars, plus fines to the local governing body having authority over innkeeper's, for not posting the rates.
Some states may not control this, but they are in the minority.
Gas stations are also regulated against price gouging.
I have successfully shut down a few businesses for violating state UC codes. Others have paid steep fines.
These posted rates are the maximum rate the hotel can charge for one night, during a special event, or during peak season.
Recently a dive hotel like an old run down Day's Inn attempted to charge $1000 for one night, but the maximum allowable was $400, for a room meeting those standards.
The room was not posted, so the customer was refunded $3000 + 3x travel and legal expenses, and the owner was fined $10,000, for not posting their rates.
With the solar eclipse looming, price gouging is rampant in some smaller towns.
I put 25 gallons of gasoline in a truck that had a 20 gallon fuel tank. The owner of that station was shut down, and fined.
I spent a lot of time traveling for work, and crooks are quite plentiful. I have seen overcharges on my credit cards more than once, too.