For an idea about society, that is an incredibly isolated lens on the problem.
You gain something if others put their trolleys away. You gain something [fuzzy] knowing you may have helped others. We have these mechanisms of cooperation that some people eschew, that some demand, and coin-release trolleys are the response to what happens when it breaks down.
Coincidentally a supermarket near me has recently converted their trolley stock to coin-release. I have three children and increasingly few Pound coins so a result of this is I shop less, and far less impulsively. Good job, Tesco.