accidental fire...collapse during a storm...
When I was young we lived ohio on a property with 2 rental units. We bought it and lived in one and wanted to demolish the other. the town refused in every way possible - loss of tax revenue I suppose was their underlying reasoning.
Where I live now grandfathering is common (pa). And building codes are now pretty much nationwide - and as long as you do NOTHING to the property, you're OK. As soon as you do anything that requires a permit most everything you touch has to be brought up to current code. In PA it was county by county what they had for code till about 5 years ago, now we follow the national code - so MUCH has been done wiht no permits, no code concerns, etc.
IN otehr words, buyer beware.
And one's insurance company can always step and in create issues..must have a railing, new roof (both in mycase) or new wiring (friend had some knob an dtube in an old house).
Not sure what the definition of a dwelling is..I mean, can you call it a shed, chicken coop, etc?
Each area is so different..someone here wanted a barn on a lot - they bought 2 lots that abutted, and were told no, had to have a home on it. They could 'un-subdivide'..which they did, then the town told them no again - they passed a new law that no outbuilding can have a footprint larger than the house...which annoys me as I wanted a barn. Now the house can be as big as you want...but that cranks up the taxes and forces a re-assessment.
So..remove struction till it falls down...or there's a fire while you're working on it...who cares about teh insurance, just sweep up the mess.