If there were any regulations about it then it was a violation of them either way. But don’t drive down the street past a skool with your legally owned pistol or dove hunting shotgun in the car.
The regulations often only regulate one way. Companies cannot build their plants near human habitation when their effluents may be hazardous to human health, but that doesn’t stop humans from being stupid and building their homes near those plants.