You may also be forgetting the other amenities that hotels may provide: the additional cost of common area facilities (exercise rooms, breakfast areas, pool, etc) the hotel provides for the guest. Room service, turndown service, and daily cleaning also play a huge role.
There's also a huge amount of space that's used for things like lobbies, front desks, back of the house offices for the accounting/managerial/etc staff that keep not only your one room operating, but provides the flexibility to rent 100, 200, 300, 400 rooms.
Then of course, you have the construction + regulation that goes into a hotel. Guestroom entry doors must meet a specific fire-rated standard (greater than those normally found in residential homes). In the United States and in Europe, each guestroom is designed to maximize the protection of the occupant from environmental threats. Fire alarms and sprinklers are regularly tested, every entry door has a lock whose key is tightly controlled. HVAC systems are constantly maintained so that dust and mold don't build up inside.
And so on, and so forth.
Hotels also have a lot of empty rooms that cost money to maintain whether they are occupied or not.
Hotels employ staff, not all of whom are fully productive 100% of the time.
Before a hotel takes my money I actually know where it is. The hotel is governed by local legislation so I have redress if something goes wrong.
I may have some redress with Airbnb but I wouldn't like to bet on it.