In my case, Yosi, the items were likely from the previous customer, sold rung, paid for, but not settled in the register. So that when my purchase was rung in, it just added to the subtotal already inthe machine. The clerk would just pocket the difference at the end of the shift.
It's similar to a gas station scam that has popped up from time to time. Customer 1 puts 40THB in the motorcycle, customer 2 asks for 100THB. The employee doesn't reset the meter and the customer doesn't know that they only got the difference between the last sale (40THB) and the current 100THB showing on the pump. Google this one, it's been around for a while.