In the US, hotel rooms are often used for illicit activities (prostitution, hiding spots for fugitives, drug deals, etc.). Having a copy of each guest's ID sends a message to people that they are not anonymous and gives the hotel some information to provide to law enforcement if necessary.