Where I am, to unlock a cart, you have to insert a coin, and afterwards, to get the coin back, you have to lock the cart to another cart (that's hopefully part of the pile). It mostly works.
They do this at one particular store here. They also pay really well, have incredible prices, and let their cashiers sit in chairs while they check groceries. I like that store.
I've seen a lot of places here drop this system. I have no idea why. Then again, you could also just go to the info and get a plastic thing to unlock them.
They stop doing it often because it gets homeless people coming to the store specifically to return carts that people didn't return so they can collect the refund.
I would hope someone realized it accomplishes nothing except being a mild annoyance for customers. Most people return the carts anyway and it doesn't really stop anyone from stealing them if they really want them (or rather buying them for ~1 euro).
I'm not so sure. It's a really small push but people from places where it exists only in some places and where in others they don't return the carts it seems to be working. Here they are returned, but we are so used to the coin system that it might be leftover from that. Anecdotally I've noticed people leaving them wherever more if there's no coin system. But also my area has a lot of first generation and very recent immigrants so they might've never been with the system to begin with. Or it's a cultural thing. Dunno. Might be all the reasons.
I do think there's regional variation. In general, we don't have this system in the US, except for a few grocery stores that are US divisions of European companies. I've lived in a few different areas in the country, and in some areas it seems like very few people return their carts and just leave them wherever, while in other areas, people are more conscientious about it. I rarely see a stray cart in the grocery store lots where I live now, for example, but when I lived for a few months in another city, it seemed like everyone just left the cars where they wanted.
I think there's kind of a peer pressure thing going on, too - people start doing one or the other, and everyone else follows. "He didn't return, why should I?" vs "Oh, she returned her cart, I should, too."
Based on your username, I'm going to make the wild assumption that you live in Finland. I'm old enough to remember when we didn't have this system in Sweden, and stray shopping carts was never a problem back then. Anectotal and my memory may be a regional thing, sure, but where I live, most people would just put the carts where they belong because it would break the societal norm if they didn't. And my point is just that this system probably costs more than it pays off for the stores that uses it.