"I don't understand who lives in these massive homes or who can afford them"

Many of the very large houses here in California are family complexes intended for a compete extended family grandparents and great-grandparents down. This is especially the case for large houses which are built in middle class areas. Not so much the case for areas set up for "upper class" mansions.

A family of productive members can afford 3 or 4 bedrooms for each married couple with a large shared kitchen and gathering area much more easily than a house for each.