For many years Birmingham Alabama has been the biggest city in the state but in the last 7 decades a mix of white flight, a segregationist governor, alongside other factors have made Huntsville a booming city actually take Birmingham's spot as alabama's largest city.
Birmingham is essentially a Rust Belt city in the South. Its economic base was iron and steel manufacturing; coal mining was also important. The importance of those industries declined post-WWII; that combined with white flight to the suburbs put Birmingham on the decline. This is part of why the metro area is still growing while the city has contracted and stagnated; Birmingham is like inner cities in the Northeast/Midwest, shrinking while its suburbs continue to maintain population or even grow.
Meanwhile, Huntsville's growth has happened post-WWII - a reverse of Birmingham. Its primary economic base is the aerospace industry, which grew rapidly since the mid-20th century and is still a growing industry today. Biotech is also a major player there, which is likewise a rapidly-growing industry.