I think the parent comment is suggesting that residential units should not be allowed to be built around it, rather than that once someone builds a house around it the plant has to shut down.
"Surely they've had to get new permits over time as their operations changed"
I think your reading is very generous — this clearly implies that the factory should have had their operations at best frozen once the surrounding area was built out.
I think that's what they're suggesting, as well.
However: In this instance, the residential units were present before the plant was. I covered the apparent timeline some here: https://news.ycombinator.com/item?id=48254291