A developed property in SF/NY isn't like a domain name, because at some point someone invested capital to build, much as someone must invest capital to build a website that resides at a given domain name. A completely undeveloped property in the middle of SF/NY has no intrinsic value: it's value based upon what's around it (e.g., the massive developments we call a city).
If we must have a real estate comparison to a domain name, it would be this: an island, made only of sand, out in the middle of an unending ocean full of other islands made only of sand, so geographically separated as to be completely isolated from each other.
One, this ocean does not exist on earth, and if it did, the real estate business would not be built around the buying and selling of these islands of sand for the purposes of development.
This feels a bit like a straw man, I know, but I'm trying to illustrate just how untenable the comparison between squatting and real estate truly is.
More importantly you can't buy a piece of land for $10 and sell it for $50K a few years down the road.
You absolutely can. Perhaps "a few years" needs to be redefined to a decade or more, but land speculation is absolutely possible and done a lot.