I may be giving the person more credit than they deserve but I expect that it was a defensive move to stop someone behind them, getting ahead by forming this new line.
I tend to judge lines by the number of people behind me rather than in front of me. If there aren't many people behind you, then your place in the queue isn't very valuable.
I don't like people doing this kind of thing - it often happens in stores where people jump ahead in this way. Normally I just imaginatively 'laser burn' a hole in the back of their head. It's the lesser of two evils.