You don’t have to, most people buy their apartment. If you don’t have the money when you’re young, parents tend to help out with the down payment. The more you get from your parents, the closer to the city center you can live.
I can see why this doesn’t work for everyone, and I wonder what kind of social effects it will have.