Raw land in most denser US urban areas is not cheap. There’s also huge incentives to build additional units. I’m Berkeley where I live it’s becoming more common to see developers buy a run down single family home and raze it and the city will allow you to build a 3 or 4 unit townhome in the space. Much of this forced by state laws, particularly if a unit or two is reserved for low income families.