You pick the shorter checkout line. Then the customer at the front has a problem, and people who arrived after you get served in the other line.
With one shared line, everyone waits together. Each time a checkout opens up, the next person in line goes to it.
So people are served in the order they arrived. Nobody has to guess which line will move fastest, or watch a later arrival get served first.