I do not find the racial and sex mixture for Silicone Valley to be odd considering the following factors. I am not saying these are good things, but they are the big influences IMO:
1) Privilege and Opportunity - It has been my experience that many of these people either grew up in a solidly middle class or upper middle class environment. A good education was available for them from birth, right through to university. This education makes a big difference.
2) Birds of a Feather Flock Together - People often associate themselves with others who are like-minded, and similar in a number of characteristics. This could even include race.
3) Females & Sciences - Women in general are under-represented in the sciences, especially within IT. IT has built itself a nice little sausagefest.
Having noted all of the above, SV is getting more diverse now by giving the high paying jobs to people with H1B Visas. I am not so sure this is a good thing. It would be awesome if the USA can get more opportunities for its current population.