Dumb question. What is it about CA/NY that makes people willing to pay these exorbitant prices for housing? Supply/demand obviously, but presumably, you're getting something for all that money. The demand has to come from somewhere. I've been to LA and New York several times, and don't see what's so amazing that would make anybody would choose to live in either given the cost.
Jobs tend to be higher paying, schools at least here on Long Island tend to be among the best in the country, so quality of education is key.