"Why don't the people of Gotham just move?"
Because it's a massive East Coast city but the property values are probably like $200 a month for a three bedroom apartment, and most Gothamites are like, "Hey, Bane never swore to break my back."
And here's the thing: you're not just moving out of Gotham City. You're moving into the rest of the DC universe. And it has hero-based power scaling.
Oh, Metropolis looks fucking great. But it gets invaded by aliens and robots and demigods, because Superman is there.
Wonder Woman's tangling with gods.
You go to Central City, and some Reverse-Flash motherfucker runs backwards from an alternate future and kicks your balls off at the speed of light.
You could move to the West Coast, and oh, an entire city just gets exploded by Cyborg Superman or some shit.
How about you move to Indianapolis, or Cleveland? Haha, no. They have no protector during the alien invasions, and you're in Cleveland
So stay in Gotham. Sure, you have lunatics, but you know that if you had a gun, you at least have a chance against the Joker or Riddler. Mongo of War-World would crush you. But Gotham just has creeps, and you know you have a chance. Even Bane, R'as Al-Ghul, Killer Croc, and Mr. Freeze are just slightly altered dudes. Oh no, Poison Ivy is going to kiss me to death! Who gives a shit, you kinda wanted to go out that way anyway.
There are super-intelligent telepathic gorilla warlords in Africa and the Greek titans are real and chained in the abyss