Just because you cannot buy a house where you want to live doesn’t mean you cannot live there. Rental rates are actually pretty reasonable in SD and many people don’t mind commuting a long distance to work to get to areas in which they can buy a nicer house.
The reason median income doesn’t matter IMHO, is because there are not enough houses that change hands every year in SD for all of those people with the median income or higher to buy one. In other words, if prices were set based on median incomes, then there would be an instability because the demand would far outweigh the supply.
The other problem with the median income analysis is that it does not take into account other sources of wealth including stock options and equity from prior home sales.