Bessemer's middle class are poor in national terms, they are aware of other areas in the country and likely don't limit themselves to their zip code when making comparisons.
Warehouse employees in Bessemer are not making $40k. More like $20k with minimal benefits if they're lucky. Keep in mind that's before a couple grand in income and sales taxes.
Median Value of owner occupied housing units:
National[0] - $217,500
Bessemer, AL[1] - $86,500
Median household income:
National - $62,843
Bessemer, AL - $32,301
[0]https://www.census.gov/quickfacts/fact/table/US/PST045219
[1]https://www.census.gov/quickfacts/bessemercityalabama