Lucas Jackson / Reuters

Battlefield tourism is the sour term occasionally used by soldiers when some group of distinguished visitors shows up in the deserts of Iraq or the mountains of Afghanistan. From the soldiers’ point of view, the itinerant pundits or officials are a nuisance. They require special care and handling, they ask dumb questions, they take up the time of harried commanders and sleep-deprived intelligence briefers, and they really don’t get what this enterprise is all about. The visitors will probably go back and brag about their time under fire when they have just been lounging around a safe forward operating base—but if they do force their way to a place where bombs go off or snipers shoot, they can be a real menace to others as well as themselves. And God help you if an unlucky rocket so much as nicks them or, infinitely worse, takes them out. The grunts may understand that everyone downrange is at the mercy of the hazards of war, but the higher-ups are unlikely to be so philosophical about it. Stuff happens, but it had better not happen to the distinguished visitor.

Of course, it’s a lot worse when it is the president who comes calling. Secret Service agents, who in the United States happily shut down half a dozen or more city blocks, nail blinds to windowsills, and give innocent pedestrians the fisheye during presidential visits, become obsessive-compulsive berserkers when the commander in chief of the armed forces (not of the United States, let it be clear, but only of the American military) goes to a war zone. Such visits require fleets of special vehicles and helicopters, extensive screening, extraordinary secrecy, and a zone flooded with armed men and women. They are a massive pain in the neck.

And yet presidents need to visit the troops—it is a vital thing to do. Part of this is simply good leadership, because despite the cynics, most of the grunts want to see their president. For one thing, a president is, by definition, a celebrity, and the troops love celebrities—television or film stars, singers, you name it. They want the selfies and the signatures, and they get a kick out of watching the president serve Thanksgiving dinner or mug with a sweating, oil-stained mechanic. In that respect, they do not differ from their contemporaries in the civilian world.

A presidential visit is also a reminder that they are not forgotten. The forever wars, as some have called them, have lasted 17 years. You may be a 19-year-old who has never been away from home this long. Or, if you are a sergeant and on the front lines for your third or fourth or fifth deployment, having missed the birth of a child, an anniversary, or a parent’s death, you begin to wonder. Israeli soldiers get to go home every second or third weekend. American soldiers get either six or seven months without a break, or a year with a single, jarring, two-week interlude back in the world. Email, telephone calls, and videoconferencing make things better in some ways, worse in others, but they cannot alter physical absence. And the year-after-year grind of battles of ambushes and raids, where progress is uncertain or unknowable, raises the question of futility. Was this worth the death of friends, the breakup of a relationship, the absence from family?

It is a truism that soldiers fight for one another. But they also crave the sense of larger purpose and support, and a presidential visit can provide it. They know it’s a big deal for the boss to show up. And since troops talk, stories about the visit will ripple, including when the president gets back and calls the family of the private he met and tells them how proud they should be of their daughter or son. It is why, despite the losses and suffering of the military in Iraq and Afghanistan, the mistakes and misplaced judgments, George W. Bush remained popular with those in the field. Like any really good politician, he knew how to connect with them and radiate the warmth that they needed and that he could uniquely give them. Leadership at the top is often about providing that “touch of Harry in the night,” as Shakespeare puts it in Henry V. The young king, on the eve of Agincourt, cheers his anxious, outnumbered army by going from campfire to campfire, saying nothing of consequence, but simply showing up and making his presence felt.

But a presidential visit has other functions, including teaching the president a few things. “Always see for yourself,” Winston Churchill once said. “Once you have seen a thing working, you know how it works.” Even a brief visit to a war zone teaches you things that the antiseptic environment of the Situation Room cannot. You can judge whether commanders are genuinely upbeat or putting on an act. If you question shrewdly, you can find out what their real anxieties are. If you look at them from five feet away, in their fatigues, you understand them better than if you see them in a video teleconference. Having met with the earnest young enlisted, you think harder about the responsibility you bear for sending them into harm’s way.

Furthermore, if you have at least one meeting where you kick out of the room the colonels and above, and sit down for a mediocre meal only with the captains, you might get closer to ground truths that are less apparent from Washington. If you merely smell the aviation fuel and the dust, see the barren hills, and feel the 120-degree heat, you will understand your war a bit better. That is one reason the aged prime minister of France in 1918, Georges Clemenceau, who was in his late 70s, visited the trenches almost once a week. It is why Abraham Lincoln, and Churchill, and David Ben-Gurion got out to the front lines, too.

The protection of the Secret Service makes it about as unlikely as it can be that a president will get hurt, let alone killed, in a war-zone visit. If the other side sees an opportunity, however, it will try. In 2007, a car bomb went off at Bagram airport while Vice President Dick Cheney was visiting. A decade later, a rocket salvo hit the Kabul airport shortly after Secretary of Defense James Mattis and NATO Secretary-General Jens Stoltenberg had left the base. Something bad could happen.

Hard as it may be to say, that is okay, too. Shared risk is indispensable to wartime leadership. No one expects a president to walk point or hump a 100-pound rucksack. But risking even a modicum of danger is important. If a president got hurt, he would get the best medical care in the world, and though the incident might give the Secret Service conniption fits, it would inspire the troops and the country no end. For evidence, see the soaring popularity of Ronald Reagan after he took a would-be assassin’s bullet in 1981 and responded with endearing pluck and grace.

And if worst came to absolute worst, only Lincoln and Franklin D. Roosevelt were indispensable as wartime presidents. The country will do just fine during and after the state funeral, while those who mourn you can take consolation in the fact that, after all, you fell, as those two great leaders did, in the line of duty. For presidents worthy of the job, that would be enough.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.