When you're a big company like Google, you *aren't* hiring for a specific domain or position. You have a lot of work to be done. What you're doing is hiring someone capable of begin a successful programmer at the company. They can then learn what they need on the job, or be switched between roles to one where they'll be more successful. SO long as they stay with the company, you still did the right thing by hiring them.
Hiring for specific roles is something small and mid-size companies/departments need to do. Startups need someone capable of doing everything. As they grow bigger, they need to fill specific roles. When they grow big enough that recruitment is a major issue, they're looking for smart people and are willing to train them.