When Jeff Bezos, founder and CEO of Amazon.com, launched its grocery delivery service AmazonFresh, he chose a surprising team to lead it. He didn’t choose successful supermarket or delivery executives. He chose the people who had failed at the very business he was launching.

The thing is, that Bezos didn't always think this way. Early on in Amazon, Bezos only wanted to hire people who had “been successful in everything they had done.”

Related: How Failure Made These Entrepreneurs Millions

But as Bezos built Amazon, his thinking changed about hiring people tempered by failure. The reason why is not immediately obvious but it makes sense and it'll change the way that you too think about hiring new employees.

Failing, and failing big. Webvan was a grocery delivery service that went out of business during the first dot-com era. They didn't just fail, they failed spectacularly. There strategy for local delivery was totally wrong.

They raised $375 million in funding, expanded to 26 cities and signed a $1 billion contract to build high-tech warehouses, all before finding a working business model. Nowadays, companies like FreshDirect, Uber and Postmates have found success with a complete opposite model. They nail it in a single city, then they scale it.

Nonethelss, Bezos hired former Webvan executives to run AmazonFresh. He didn't just hire the guys who failed, he hired the guys who failed big. But, because they got it so wrong, they took away the deepest learnings from their experience. They slowly rolled out AmazonFresh in Seattle before expanding. They're making use of Amazon's warehouses rather than building their own.

In fact, Amazon's warehouse technology is powered by Kiva, which Amazon acquired in 2012. Kiva was founded by a former Webvan exec.

What Bezos and Google learned about innovative people. What Bezos learned at Amazon is that “failure comes part and parcel with invention.” When you’re innovating, failure isn’t optional, it's part of trying something that no one has ever tried before.

Related: Why Entrepreneurs Should Plan for Failure, Not Success

Conventionally successful people are often those who’ve played it safe and haven’t tried to innovate. Hire people who’ve failed at doing something bold, because they’re the only ones who’ll succeed at something bold.

Google has made similar findings, moving away from hiring based on university prestige. For the longest time, Google was a place that was near impossible to get a job if you weren't a Stanford or MIT grad. They not only asked you for your college GPA, they even asked you what you made on your SAT as a pimple-faced high schooler.

But after analyzing reams and reams of data on what made employees successful at Google, they found out that it had nothing to do with college GPAs and SAT scores. "Numbers and grades alone did not prove to spell success at Google and are no longer used as important hiring criteria," said Prasad Setty, vice president for people analytics.

Rather, based on extensive surveys of its work force and performance data, Google discovered that its most innovative workers “are those who have a strong sense of mission about their work and who also feel that they have much personal autonomy.”

When you're hiring for innovation, look past the flashy school and the credentialed C.V. and look for someone who's failed. Those are the people who are driven to try, fail, and try again until they get it right in the cause of invention, not those wrapped up in worrying whether they look like a success to others.

Related: Richard Branson on Embracing Failure