Because no one had wanted to live in the city centre for decades. It was deserted and dangerous from the 90s until the tourism boom. The castle district, the epicentre of tourism in Lisbon, lost population every year for something like 30 consecutive years. Thankfully foreigners swooped in and ignored the dereliction and drug addicts for long enough to make the historic districts liveable again.