I've been trying for a few minutes to think of a way the city's position makes sense, but yes, as presented your explanation seems like the only viable one. A 130 year old building, which also happens to be the most famous monument in your city, would be grandfathered in in any other context.
It would be extremely interesting to read more about how this played out and why the basilica agreed to pay. Was there a lawsuit?