The stores track the individual items for inventory planning and marketing purposes.
Having worked in the transaction processing business for a time (writing one), I can say with confidence that the credit/debit card companies do not receive an itemized list of the items involved in the transaction. There is usually a description field in the information transmitted to the processor, which may or may not contain useful information. But it is not big enough to contain an itemized grocery list of any size. And it is not standardized in any way that would facilitate reliable parsing. There may be an amount of metadata about the transaction that would indicate the types of products involved in the transaction, which they can also infer from the merchant reporting the transaction.
There are efforts to increase the amount of data reported, but they are not widely used yet, due to the overwhelming numbers of banks that would need to be upgraded. These efforts are rolling out only in specific and limited uses where the banks involved are willing to upgrade software and equipment.
For now, the best way to know what you bought is to keep your receipts from the store. Shoeboxes work great for this. So do smartphone cameras and a folder on your hard drive. There are also mobile apps that track receipts for you, and may even try to OCR the data for you.