Despite the fact that paying the ransom will enrich gangsters at public expense, the city is arguably getting a bargain
Cheaper still: a good sysadmin and daily off-site backups. Maybe a mirrored system if you want to get all fancy. I guess that in 2019 some cities like to live dangerously.
Once you pay off an extortionist, they’re going to come back for more.