Over here, certainly in the recent past though less so nowadays, the system tends to be that the carts are all connected to each other in the corral and in order to unlock one to use, you have to slot in a coin (the equivalent of a dollar). Then after you've done your shopping and returned the cart, when you click it back onto the other carts, you get your coin back. If you can't be bothered to return the cart, you're effectively paying an automatic fine for that since you've lost your coin - and whoever picks up your unattended cart and properly returns it, gets it instead.
Of course, now that less and less people use coins or even cash money at all, this is becoming rarer and many stores don't do this anymore. Most people do still have the habit of returning their carts though - or if you pay attention a bit, odds are you may be able to hand it over to someone else heading into the store, without having to walk all the way back to the corral.