I should probably clarify that it's actually the main way to get an interview (not hired) - you still have to pass whatever the interview tests are and a referral doesn't really help you there.
It's one of the main benefits of living in the bay area, you build out a network of friends working at different companies which adds a layer of job security and ability to interview more easily at interesting places.