For those in the tech sector, there is no affordability issue, only entitlement issue
If they are married, both in tech, their salary will be in the 300k-400k range, that's about 25k - 33k/month before tax, or about 15 - 20k/month after tax. with today's interest rate, $1MM house will need a monthly payment $4k - $5k/month including property tax. The couple will still have about 10k/month left after paying the mortgage.
Assuming they are renting and are fiscally responsible, they should be able to save about 70 - 100k on 300 - 400k income/year. which means they will just need 2 years before they can save up for the down payment.
So where is the issue? The issue is they jumped their league - Sunnyvale, Palo Alto, Mountain View, SF are the 'major leagues' - foreign cash buyers, tech execs or, more commonly , average Joe who sold their first house with $500k+ gain in tax free equity - (not hard to do in the bay area btw). First time home buyer will have a tough time competing in this league.
Try the minor league instead, try east bay, dublin($900k), livermore still in the $700k - both good schools but 60min+ away, or how about places like Newark or Union City, still in the $700k, both within 30 mins drive (but so so schools).
If they are struggling to buy a $2MM home because they have to buy in these neighborhoods. it's an entitlement problem, not an affordability issue.