Earlier quoted context omitted.
Little bit of both? Also probably to prevent the temptation of theft. Even though the fee is nominal, it seems to be enough of a detractor?
I don't think "theft" is the correct wording. Rather "taking it with you and not returning." If it really was about stealing (taking and intentionally keeping), the 1€ or free plastic coin you can get at the counter wouldn't deter you at all.
Most homeless and poor people know this trick. It really is just for general populace who are too gullible to know better.