And whether it's right or not for the city to do this, obviously they did it, and it seems likely they'd do it again.
As for getting a new lock, you'd have to sue them, and in general the odds of successfully suing the government are slim at best. And for only $20? (An apology is not likely at all.)
Chalk it up to experience, consider yourself lucky that you got the bike back at all, buy a new lock, and don't let it happen again.