If a security guard sees you paying for just a magazine, then heading out with a load of shopping he is only doing his job by checking that you have paid for it. I don’t see any reason to be angry, though I, too, would be mortified at being taken for a possible shoplifter. After all, we are all having to pay extra to cover the huge amount of stealing that goes on.
I tot up my total amount as I put things into my trolley, so have an almost exact figure in my head when I reach the till. If it turns out to be different I will scan my receipt to see what is wrong. I only keep receipts until I have balanced the monthly figures in my account book with those in my internet bank. I also used to work in accounts, and have kept the habit.
Far from being a chore, I enjoy seeing it balance to the last penny (almost always) and the bit of detective work needed if the figures don’t match.