A Credit Card is a strictly personal item, has your name on it and you are the only one allowed to use it, to the point that if you want some relative being able to use that card...you must ask your bank for a family card/second card/linked card/whateveryourbankcallit card.
Asking for the ID is not mandatory, but it's a common procedure in some shops -usually they simply check if the name on the card matches the one on the ID, and if the photo on the ID matches you; it should be, anyway, always a mandatory procedure if your card is not signed, as much I can remember. Finally this apply only when you're paying by signing the bill, if you pay by inserting the PIN there's no point into requesting an ID (even if I've found that some big supermarkets in Italy still request it, and I think even Ikea stores in Milano area...but I maybe me wrong, been ages ago)
In any case, the shop is not required nor entitled to register your ID data.