Just say you’ve changed your mind, forgotten your wallet/purse etc. Remember 99% of staff don’t really care that much. Or just take back for a refund.
This depends if you’ve paid or not, if you’ve paid then it becomes your property and technically they can’t take the items off you, simply walk away and don’t let them hold you. If you’ve not paid then they have EVERY RIGHT TO NOT ALLOW YOU TO BUY THE ITEMS!
Pro tip: We always carry around enough money to cover the price of the shopping in coins, once we’ve scanned a few items (never take more than 5 glitched items to the tills, unless the staff don’t seem vigilant) and if staff are coming over we simply throw in the coin/s into the self service machine as quick as possible! This means you’ve paid = they can’t take the items off you 😉
Companies generally don’t do these on purpose, except sometimes Tosco* with the iPad glitch [in our opinion].
They’re caused by human error, a computer glitch, a marketing ploy gone wrong or simply end of line clearance. In this case two promotions working at the same time or old stock.