This situation is really contextual. There are several large, private residences in my area that need to have a lock on the gate that is accessible by the fire or sheriff's departments. There is no other way to access the property in case of fire or emergency, short of a wrecking ball. In these cases, the owners can refuse to comply, but they also need to suck it up and deal with it if their place burns down. No turning around and suing the city for failure to provide services.
However, this isn't something that should be legislated, and in case of emergency, by all means break a window or smash a door. Like one man said, that's what I've got insurance for.