Many POS terminals send full purchase information back to the cc processor. This is used in fraud detection and also sold as part of your profile.
A while back Mastercard did a commercial where they showed you how you could see what you bought in your online statements.