As Li Zhi said, showing an ID is for the protection of the hotel. Hotels are in a very risky business, that is, letting complete strangers stay in their rooms. Any said stranger could easily steal things, or destroy things.
As for why some hotels copy them: that's so they have proof who was in the room, should any legal need arise. When I worked at a hotel, we always had to look at the ID to take down basic information such as name and address. But, for cash paying customers, we also had to get a copy of their ID. The reason we only did it for cash paying customer was because if they stole or destroyed something, we couldn't just charge them after they left. Whereas, with a credit-card, we could bill after the customer checks out.
As for whether or not it's common practice: depends on the hotel. Most hotels are franchise locations. That's why you will find a lot of differences between how things are managed from hotel to hotel, even if they're the same brand. It's up to the franchise owner to determine policies for things like copying IDs. Because of that, saying things like, "When I stayed at [Hotel] in [Other City], they didn't do [X]" is pointless, because it's a different owner.
I will also re-affirm as others have stated that a passport also works, if you're from out of the country. If you hand them a US passport, they most likely will not take it, as that just seems really sketchy (like you're planning something, and thus don't want to give them your full information).
Touching on the identity theft part, it's all basic or useless information that is kept. For the one I worked at, we kept:
- Issue Date
- ID Number
Also, making fake IDs is very difficult, there are several layers of security built in to the ID itself that help to prevent fake copies. I will say that if you're worried about the paper copy (some states issue a paper version before the card version), then it is illegal to copy the ID at its original size. They should blow it up if they copy it.
So, in summary: yes, it's common, but it's also hotel dependent. It may also depend on how you pay whether or not they will take a photocopy of your ID.