I was in France recently and used a public restroom. It had an attendant, and a fee of €0.50. Charging for the restroom is unfortunate, but this setup is certainly better than eliminating public restrooms entirely.
The 50 cents is dual purpose, the one is obvious in that it pays for the attendant and them keeping it clean, but the other is like using a coin to unlock a trolley, it cuts back misuse by a lot. Once you've been to free vs 50 cent toilets a few times you'll see (and smell) the difference.
The incentive to do the right thing that a coin-deposit shopping cart ("trolley") adds is the ultimate return of that coin. It's not much money, but it is nonetheless returned when the cart is put back where it belongs.
If a cart always costs 50 cents and there is no hope of ever getting that money back, then: The monetary incentive to return the cart doesn't exist.