Well, apart from the obvious (i.e. he was simply a thief), two possibilities spring to my mind here:
(a) he could have genuinely forgotten to pay. (I've actually started to walk away from a self-service checkout before realising that I'd not paid. So I know that it can be done) ;
(b) it could have been a machine error, as below . . .
Some years ago, I paid for about thirty quid's worth of shopping with my card at a self-service checkout in Tesco and got a receipt. I was just about to walk away when I noticed that the screen was still showing "Please pay £30", as if I'd never paid.
Fearing that an assistant would spot that as I walked away and (quite reasonably) assume that I was a thief, I called someone over and explained the situation.
She said, "That's impossible! The machine can't do that!". I pointed out to her that it obviously had and invited her to check my receipt and the shopping in my bag.
I left her looking baffled!