During checkin you have to fill in a form so that the hotel can potentially inform the authorities who is currently residing there. Similar to legislation that requires anyone living in Germany to register their place of residence. You don't have to show ID, stating your name and (usual) residential address is sufficient. Even for registration of local residence ID is not required, in fact you can even mail in the form without personal appearance.
Chain hotels do this data collection via their system, and usually just pick the required data from your reservation. Sometimes when you require a different billing address (for expensed trips), this gets tricky as they have to fill in two fields. Similar to airlines collecting your full name and passport/visa details for the immigration authorities.
I am annoyed by European hotels charging more for more than one occupant, and usually only book for one person and see what happens at checkin. In the past 7 years I've never been really challenged by anyone, even when having my wife and two kids standing beside me. The PH in Istanbul once got very nasty, but settled by charging 20€/night extra for my wife because of the 'additional breakfast cost' (never mind that we had a suite via a DSU and I was Hyatt Diamond with free breakfast at the time). A Mercure in Paris saw the family and said 'I better give you a bigger room', the Ramada in Berlin I usually stay at always gives us a suite. I recently redeemed some spg free nights at the Le Meridien in Hamburg and told them I was coming with family, they charged me 60€ for a rollaway bed but made sure we got a really large room. This to address the comment that chain hotels may get nasty.