You are required by law in Italy to register with the police. Rather than having thousands of people go to the police station every day, the hotels do it for you. They used to keep your passport to copy later but most now just take a photocopy of it.