Many reasons, but probably the biggest one is social shifts causing an overall degradation of city life resulting in people leaving. When the Chicago Board of Trade ended floor trading a significant amount of large finance companies moved elsewhere, some relocated to Dallas, some reduced staffing/office space and had principle officers in NYC already.
There's a lot of conversations about cities in the Midwest simply not happening, even though critical decay is occurring. St. Louis is another example of a city where they were doing very well for awhile and had a strong aerospace/telecom/manufacturing/tech sector and the city has now decayed dramatically to the point many businesses have pulled out and crime rates have skyrocketed. St Louis and Chicago are both more dangerous cities than Detroit, and all the available evidence points to violence being primarily a socioeconomic issue rather than an issue of any other factors.
If you’re looking for somewhere to invest, anywhere in the bottom of these lists will make it much harder to earn a decent ROI due to a higher taxes to government services ratio compared to places higher on the lists. Chicago unfortunately is at the bottom of both lists.
Chicago used to have extremely high industrial employment, so the general downward trend across the United States was amplified in Chicago. The population peaked in the late 1950s and has been dropping since, although the rate of decrease has been dropping as Chicago has transitioned to a very diversified economy. The north side of the city is now very stable population-wise and the downtown area has seen incredible growth (in the last 3 censuses, Chicago has seen higher downtown population growth than any other city in the US), while the south and west sides continue to struggle. These are the areas that were the most industrial.
Houston has seen tremendous growth primarily through annexation. It is now more than 3 times the geographical size of Chicago. But annexation of residential land in Texas is now far more difficult, so the geographic size growth of Houston has dramatically slowed [1]. Once all the undeveloped land is used, Houston will have to rely on densifying for population growth. Current restrictions make it unlikely to ever be as dense as NYC, Chicago or LA, but with its massive size it wouldn't need to be to attain 5 or 6 million residents. On the other hand, it is already facing growth challenges that may reduce the carrying capacity of the city [2].
I'd guess that Houston surpasses Chicago in population within 15 or 20 years, but it remains to be seen if that is going to be permanent or not.