Since rumors began to spread that a startup called Palantir helped to kill Osama bin Laden, Alex Karp hasn’t had much time to himself. On one sun-baked July morning in Silicon Valley Palantir’s lean 45-year-old chief executive, with a top-heavy mop of frazzled hair, hikes the grassy hills around Stanford University’s massive satellite antennae known as the Dish, a favorite meditative pastime. But his solitude is disturbed somewhat by “Mike,” an ex-Marine–silent, 6 foot 1, 270 pounds of mostly pectoral muscle–who trails him everywhere he goes. Even on the suburban streets of Palo Alto, steps from Palantir’s headquarters, the bodyguard...