In the US, the FAA is very careful to prevent construction around airports that might present a hazard to aircraft. There have been a few cases of builders failing to consult federal laws and they construct something that violates those published safety criteria. In those cases, the FAA has ordered the builder to dismantle what they built and it carries force of federal law behind it. Because ultimately, a hazard to aircraft always ends up being a hazard to those on the ground -- at least until someone repeals the law of gravity!
In the US, nearly all airports were built originally on the outskirts of cities because we've never really had a shortage of land here -- at least not like in most of Europe.
However, in Europe, often airports had to be squeezed in. So, one couldn't be as choosy.
Worst was the old Hong Kong International. Things got so bad there, they ended up building an island for the new airport! At least it won't suffer from encroachment!
Ken