It costs money to run a hotel well. From the front desk to the cleaning staff. If a stay costs you $40 a night, you have to ask yourself "What are they skimping on? Are they not washing the sheets? Vacuuming? Cleaning the showers/toilets?"
Sure, there are some economies of scale at play. But by and large, it takes quite a bit of money to make sure things are well maintained. That is what often gets reflected in your hotel bill.