In the spring of 2004, as SpaceX worked to build its first rocket, founder Elon Musk wanted to hire a brilliant Turkish engineer who was taking graduate-school classes at Stanford. The problem was that the engineer, Bulent Altan, enjoyed living in the San Francisco Bay Area, and his wife, Rachel Searles, had a great job there at Google. So when several of Altan’s friends who worked at SpaceX prodded him to visit, Musk was ready. During an interview, Musk said, “I heard you don’t want to move to L.A., and one of the reasons is that your wife works for Google. Well, I just talked to Larry, and they’re going to transfer your wife down to L.A. So what are you going to do now?”

Altan sat in stunned silence for a moment. Then he replied, given all of that, he supposed he would come work for SpaceX. The next day Searles went into her job at Google, and her manager said the oddest thing had just happened. Larry Page had called to say she could now work from the company’s Los Angeles office if she so desired.

During the process of writing Liftoff, my book about SpaceX’s early days, I heard story after story like this. And as I reported more deeply, it became clear that one of the reasons SpaceX has done things in spaceflight that no one else has—such as landing the first stages of rockets on drone ships on the high seas—is that Musk goes to great lengths to find and keep top talent.

Musk attends the launch of the latest manned mission to space. NASA astronauts Bob Behnken and Doug Hurley made their journey in the SpaceX Falcon 9 rocket.

Musk personally interviewed and hired the company’s first 3,000 employees. He has a knack not just for recruiting the smartest engineers to design and build his rockets but also for identifying those who will thrive in the intense, grueling, and ultimately rewarding work environment he has created.

Once they are hired, Musk finds ways to motivate them. One of Altan’s friends who invited him to visit SpaceX was Steve Davis, another early employee who devised and ran computer simulations of the rocket in flight. (This helped other engineers with the design of the booster and the software that controlled its ascent.) Often, Davis recalled, Musk would visit his desk to ask detailed questions about the simulations. And then, typically, they would bet on some aspect of the rocket and its avionics system.

Almost invariably, Musk would win. But ahead of one system’s test in 2007, Davis said, Musk raised the stakes. Davis bet $20 he could complete an aspect of the test by a certain date. In return, Musk bet a frozen-yogurt machine that Davis could not make the deadline. “The second we had a bet like that, where there was a chance of getting a yogurt machine, there was a zero percent chance I was not getting that done,” Davis said.

Today, if you’re ever able to visit the company’s sprawling factory in Hawthorne, California, make sure to visit the cafeteria. You’ll find Davis’s machine still serving frozen yogurt to employees, for free.

Eric Berger is the senior space editor for Ars Technica. His book, Liftoff: Elon Musk and the Desperate Early Days That Launched SpaceX, is out now from William Morrow