"Grandfathered" situations are subject to change. If a local municipality deems something a hazard or health issue, they can and will remove the "grandfather clause". Also, if the local planning rezones your area, the rules can change.
For example, if you own a business in an area zoned residential with light commercial priveleges, then the city comes in and zones it completely commercial, you will be forced to update the property to the standards set by the new zone. Even things that would seem minor, such as the minimum number of parking spaces may have to be adjusted.
The city is not obligated to pay for those updates. Their justification is "your property value increased as a result of the new zoning". In their eyes, they are doing you a favor.