because if you get mugged abroad and that piece of paper goes away along with your wallet, you are shit out of luck. A hotel can give you a lot of support in situations when you're stranded abroad. On top of granting you access to the room, they can call people on your behalf, provide a wellfare check in case you've gone missing, etc..
Exactly this, I do try to keep note in my wallet but mistakes happen, wallets/phones get lost/stolen. I like the safety net of having a hotel frontdesk staff that can help out in the worst case scenario. From a personal experience - I got really sick during a trip abroad and frontdesk staff sent someone to a pharmacy to pick-up medicines for me and they were willing to call doctors if needed.
I once got the serious runs in a hotel in India. The hotel staff brought in a doctor.
Because then they would only have one (completely valid!) criticism.
It is not unthinkable to loose a piece of paper. Front/Night desks exist for a reason in Hotels