They did it just like Apple and Microsoft did it with their own audience: by making stuff they like and being friendly to them.
People will always be biased, Google has always been a hacker friendly place so naturally hackers will like them and when you like somebody because you share their (true or perceived) values, you'll be biased in their favor.