If you look around in a small town in upstate you can find a cheaper house. If you want to live in North Carolina, go ahead. Prices are lower because not everyone wants to live there.
It is all related to the cost of living, It simply costs more to live in New York, people get paid more in New York so prices end up going up. Taxes are higher in New York, again it costs more to live there. You also have limited "space" that drives prices up. I have a 2 acre $480,000 house in AZ it would cost several million dollars in New York City, even if you could find 2 open acres.
Because there is incredible demand in New York, hence prices go up.
Supply and demand.
I live in New York and for an example I looked for houses on zillow around the 100K-140K price range and all of the houses for that price in my area of New York are small, old and beat up. I searched the same in other states like North Carolina and the houses are newer, bigger, much much nicer homes that would cost 200K-300K here in New York. Why is it so different?