It's a different situation for me but I honestly would not have put any thought into it, that is if I even noticed it at all. I'm pretty easy going when I'm out in public. Then again, being white, I have never had any of these problems. That or as I stated before, just never looked out for them. I am one to act only when it is blatant and I am left without question.
You must also consider other possibilities for why they might ask you for your I.D. For example, the chances that some kids are going to question a cashier about being ID'd for their credit card use is pretty slim, while on the other hand, adults tend to question it, that is when their ID is not requested. In other words, kids could care less whether or not you ask them, but for adults, for security reasons, they want to be asked. As some already know, I was an "angry grocery store worker" (EDJ's words) for years, and if their is any "group" of persons who I am going to ID it is rich white people, because they throw conniption fits on sight.
I'm not trying to downplay what happened to you because for all I know this could have been an act of sheer racism, but you have to be more open minded and not be so quick to jump to conclusions.
Classism and racism are often mistaken in this world.