Maybe they still cost $400K, because the purchase of the land, the labor and the materials and the interest to finance the project eat up most of that $400K, not to mention some places charge you building permits that cost ten's of thousands of dollars - if not more.
Nobody is going to build houses and sell them at a loss or at break-even price, they need to cover their costs and make some profit as well to keep the business alive.