It's not shocking, but the cost of living is a result of other factors, not something exogenous. SF is a highly desirable place to live because of the excellent food, great weather, beautiful views, proximity to Napa/Sonoma, unique counter/culture, etc. Chicago doesn't have any of those things. It just has hurricane ice winds and low rent.
If the best thing about Chicago is low rent, then the city has a real problem. (I don't think that, I am just pointing out it shouldn't be the #1 factor.)
Demand is absolutely part of it, but let's not forget the whole "supply" thing. Chicago doesn't have stupid zoning laws that prevent companies from putting up reasonably sized buildings.
Boston and DC are both significantly more expensive than Chicago, and each of the cities have some archaic/non-optimal zoning laws that prevent people from putting buildings up that would drive rent-prices down. Chicago has none of that. I know less of the west coast urban situation, but if rent prices are high, it tends to be because people aren't building enough buildings, not only because the area is awesome.