At least in my town you can opt out by paying with coins. So the convenience fee is for not having to carry coins around. For me at least it's worth the trade.
I'm sure for the city tap to pay is cheaper for them than collecting the $, even without a fee.
Coins, being cash, are simple, require no apps, smartphones, batteries, tracking, ads, or privacy violations.
The main purpose for taking cash is tax evasion, which outweighs the increased cost of cash handling.