Taxes are part of it. If overall state taxes (property, local, state, sales, and other fees) is 25% of your gross in CA, and 15% of your gross in MO, companies can reasonably expect to pay less in MO for the same work.
Another way to think about it, what percentile does your pay fall into for similar jobs in San Francisco versus Kansas City. If being paid $120k as a 5-yr Rails Developer in San Francisco puts you at the 50th percentile, move to Kansas City and all of a sudden that same $120k could put you in the 80th percentile (numbers are totally made up). Assuming developers aren't actually smarter in CA than MO, your percentile pay shouldn't change.