~100M cars are made a year
If 10% of those are self driving, and if they have $1,000 in gross margin due to self driving features, that's $10B a year to cover past R&D. Over 20 years this adds up to $200B. Optimistically, if the tech eventually reaches 80% of new cars and $3,000 margin, then we're talking $4,800 BILLION in profit over 20 years to cover R&D. Waymo is probably spending like $1-$2B/yr right now. Their engineering headcount is not huge, it's like under 1,000 based on a LinkedIn search I did last year.
Really the potential market is so huge that it can justify many many billions spent on R&D. I am relatively bearish on the technology, and doubt it will be commercialized in 10 years, but I still think the investment is justified.
Apologies for the poor writing - typed from my phone. I have more thoughts here: http://www.tedsanders.com/on-self-driving-cars/