You're confusing cause with effect. Programmer wages aren't high in the Silicon Valley because of having a lot of programmers. There are a lot of programmers because the wages are so high that CS majors come here in droves after college.
The reason the wages are so high here is because of basic supply and demand at work. Silicon Valley has only about a 3.6% unemployment rate among programmers, and a lot of the unemployed either want to be unemployed or are unemployed because their specific skills aren't in high demand. Programmers may be common in the Silicon Valley, but the demand in the Silicon Valley far exceeds the number of qualified programmers who are available and looking for jobs. Thus, the entire market is a zero-sum game, and the high wages are a result of the need to buy people away from other companies.
As a result, any sudden increase in the number of programmers drives down salaries for new hires, and fairly dramatically at that. For proof, you need only look at what happened to programmer salaries outside the Bay Area during the dot-com crash, when droves of people suddenly were looking for more affordable places to live. In some areas, salaries for programmers dropped almost in half because of that exodus.
Is it realistic to believe that there will ever be enough programmers to satisfy the Silicon Valley's voracious appetite? Hard to say. But that's a separate question.