When the University of Washington’s computer-science department wanted to poach artificial-intelligence expert Carlos Guestrin from Carnegie Mellon, it turned to Amazon.com Inc.

The Seattle-based tech giant ponied up $2 million to fund two professorships: one for Mr. Guestrin, and another for his wife, who also works in the field. To seal the deal, Amazon Chief Executive Jeff Bezos met the academic during a campus visit.

“[Mr....