Why do people live in refugee camps?

Because there are not enough houses available. It is also much cheaper which makes it a good temporary solution.