I always walk by this one grocery store and always see shopping carts lined up just before the end of the parking lot as it seems people really think the signs stating the wheels will lock is just to deter you from trying, but how does it work? My only guess would be magnetics but even then I still have no idea how that all works but I find it oddly interesting.
EDIT: Just to add on, I live in Ontario Canada. Not all businesses have this sort of thing but a lot of the bigger companies do. And yes, they are in fact real, I’ve tried to push one before, those things don’t move AT ALL once they’re across the line! Quite interesting.