This has long been the way in Continental Europe, and always perplexed British travellers who were used to their own rule of "never let go of your passport".
In the old days passports of all travellers in France had to be left with the hotel desk overnight. Monsieur le Night Porter would take them all round to the police station in the middle of the night and have a chat with his fellows while Monsieur le Gendarme copied all the details into a register. That was the requirement, a lovely piece of French bureaucracy.
In more recent years when photocopiers came along a photocopy was sufficient so this was taken at time of check-in.
MDSD mentions Russia, which is different. The hotel have to take your passport to an official office along with your arrival slip inside it. Don't really know what happens there except that no doubt, like all other Russian bureaucracy, it involves a whole lot of forms and plenty of whacking them with rubber stamps ! But woe betide you if this hasn't been done when you leave from the airport. If not stamped right it is a hefty fine for you (like US$ 100) on the spot, an amount which can be negotiable if you play things right, but certainly not if you start shouting. They don't care where you have been or what you have done as long as the bureaucratic rules are complied with.