SALEM, New Hampshire—The essence of Ted Cruz can be found in his tennis game. To put it mildly, he isn’t a natural, except at firing shots into the fence surrounding the court. He came to the sport late in life—and only then with a very specific goal in mind. As he prepared to clerk for Chief Justice William Rehnquist, he studied the ways he could get on his boss’ good side. He understood that he would only get close to the chief if he shared his passion for tennis. So in the months before his clerkship, Cruz paid for lessons that he hoped would make him a passable doubles partner, a perpetual necessity for Rehnquist. By all accounts, you would rather have Cruz on the opposite side of the court, a fact that quickly dawned on Rehnquist. “Ted,” he would scold, “ you do know the point of the game is to win, don’t you?”

We have a name for this sort of behavior—it’s called careerism. And it’s the reason that so many people in Washington despise Ted Cruz. He is always angling for the next thing, methodically seeking out patrons and nakedly pandering to them.

Ted Cruz’s careerism was so heavy-handed that it often failed. His campaign to win a top job in the George W. Bush administration notoriously backfired, despite his constantly volunteering to prep the candidate for debates and his ferocious service to the Florida recount legal brigade. Instead of a job, he earned mockery. Bush liked to call him “Theodore,” not his proper name and a moniker that Cruz despised. According to Politico, Bush has told donors, “I just don’t like the guy.”

Such rank careerism doesn’t make for a particularly good presidential candidate. But it does make for a good presidential campaign. Let’s set aside the unctuousness of Ted Cruz for a moment, to marvel at his tactical genius. If Ted Cruz persists in this race, it won’t be because of his personality. It will be because his careerism has trained him to strategize brilliantly.

Careerists quickly identify who will help advance their interests, then assiduously attempt to win these people over, without regard to how others perceive their efforts. They have an ability to visualize how systems work; they can see the levers and gears of power that are either invisible or uninteresting to the rest of us.

You can see this gift in Cruz’s ground game. His campaign has mastered the art of microtargeting. Though he poses as an ideologue, Cruz thinks about the electorate as a series of distinct piles of votes, each of which can be won over with carefully tested rhetorical pandering and narrowly tailored outreach. Of course, every campaign does its share of microtargeting—well, maybe not Trump’s, which doesn’t believe in spending on campaign infrastructure. But few have leaned on the tactic as heavily and aggressively as Cruz’s.

This reliance was evident at a rally here. Everyone knows about Cruz’s following among evangelicals, a natural base for the son of a preacher. That’s why it was so bracing to witness the preamble for this event. Like all Republican rallies, it began with the recitation of the Pledge of Allegiance. But the woman who stood up to deliver the incantation was not the person you’d expect. She described herself to the crowd as an agnostic. “I have a lesbian friend in Kentucky,” she added.

It was just the beginning of a not-so-subtle effort to play to the secular wing of hardcore conservatism, a fairly robust group in New Hampshire. There’s another way to describe this coterie of godless wingnuts—they were Ron Paul voters, now in play after Rand Paul’s exit from the race last week. The Cruz event continued with a video montage of Ron Paul supporters testifying to the sanctity of the Constitution and the virtues of the liberty movement. It seemed an aimless series of homage to a retired politician, until the voters gushingly announced that they saw Cruz as Paul’s natural heir. After the video, one of Paul’s supporters, a buff dude with a hip-length braided ponytail, stood up and announced his conversion to Cruz. Like everything about Cruz, this effort has its share of chutzpah. He’s wrapped himself in Paul’s mantle, even as Paul has denounced him as “owned by Goldman Sachs.”

Bloomberg Politics’ Sasha Issenberg has done a terrific job reporting on Cruz’s microtargeting efforts. The campaign has invested in psychographic research and polling that parses the electorate into the most fractional components. Cruz, for instance, discovered that there were 60 caucusgoers in Iowa whose votes could be swayed by their hostility to the state’s ban on fireworks. With this research in hand, he staked out a bold position on fireworks deregulation and used phone banks and social media to make sure those 60 voters knew it. Cruz is building a campaign to win by the thinnest of margins. His analysts model the precise number of votes that he needs to eke out victory, then set about devising a narrow strategy that will allow him to grind to that number.

Cruz’s campaign likes to boast about the cleverness behind his ascent, giving reporters ample access to interviews with its data scientists and analytics mavens. And in Cruz’s case, even this bragging is good politics. Hardly anybody, probably not even Cruz himself, believes that he can win on the basis of his persona. Potential Cruz voters need some reason to believe that they are backing someone who is more than a protest candidate. His tactical genius—based on a sheaf of psychographic data and a taste for vulgar pandering—becomes a reason to believe that he can advance in the contest.

So Cruz manages to advance despite being the guy who works on his forehand for the sake of face time with the boss. There’s a pretty clear limit to Cruz’s approach, however. At some point, as the contest becomes less crowded, he’ll need to win tallies of votes that exceed the capacity of microtargeting and coalition-cobbling. His careerism, his scorched-earth path to self-glory, will likely fail, as it did with his effort to get a sweet post in the Bush administration. Still, Cruz will fail with a certain genius that deserves our disdain, and grudging admiration.