That's generally not that person's only job in the market though. These same people generally have mild janitorial duties, keeping the front-end stocked with supplies, and act as general go-fers (helping people find things, putting things back on shelves, price checks, etc.) This sort of role can make things way more efficient.
In my area of the US most stores don’t have baggers. But in those that do I’ve found they are often either very young (likely a first paid job) or have some form of mild mental disability. It kinda seems like stores having baggers is kind of a jobs program/public benefit, making the inefficiency less of a problem.