Because their economic situation forced them to.
If people have unlimited economic resource, they would definitely pick a living place that possess lowest amount of danger for their families and would have aesthetical value to relief their stress. But a lot of people could only afford living in such dangerous places because the rent tend to be really cheap.