You seem to be under the impression that everyone has a choice of where to live. Unfortunately, people born into crappy circumstances aren't able to escape those circumstances a lot of the time. Just look at urban inner-city slums. Do you think most people want to live in run-down, crime-ridden areas? Of course not. They live there because they don't have a choice, they don't have the means to go somewhere else. Don't see why Nipton would be any different.
The difference is that in the real world if people live in the slums they can't just up and leave cause then they have nothing, the most they can do is squat in an abandoned house and live like rats, but that would turn them into a step better than hobos.
So they choose to stay cause the alternative is worse.
In the Fallout world it works differently.
All towns and cities have jobs for people and everyone can make themselves useful one way or another and have a decent enough life there.
Or they could just move to an empty house and try to be self reliant and hunt their own food and trade with a nearby settlement every once in a while.
So yes, if they wanted to they could just up and leave.
Sure, there's some dangerous [censored] around the wastes but they gotta realize that if they live in a place like Nipton where there is no real law enforcement they should expect that something bad is going to happen to them some day.
If not by Legion then by somebody else, maybe a psycho addict on withdrawal tries to rob them, maybe a PG wants to have some "fun" with them.
Legion executed everyone in order to stop the spree of filth that originated from Nipton and to also set an example for the rest of the Mojave and the NCR.