That's a bad take. For one, illegal immigrants are a minority of the foreign born population. Secondly, even if the statistics are by some miracle not tortured out of the numbers, still obviously not a sufficient explanation. San Francisco for example has a small undocumented population (primarily from Asia), yet also has huge affordability issues from high rental demand and income disparity. There's no world in which Mexican fieldworkers are competing with FAANG developers for $4k/mo apartments in SoMa.