Why did the Roman Emperor and Medieval Kings need to be on the front lines?

by ParallelPain

And by front line I don't necessarily mean fighting with the men and leading a charge, or even commanding the army in person (though they sure did all that). Just sitting in a city fortress close to the front line counts.

I'm guessing it's to ensure the loyalty of the army, but why is that necessary, when later government can sit comfortably in the capital and leave it to the generals, and contemporary China the emperor was sitting in Chang-an (not sure what the Persians were doing). And for some reason Japan went from the government sitting in Kyoto to the Daimyo/Shogun leading in person.

martin4reddit

Seeing and managing things first hand is always more effective that acting on reports that are often many days if not weeks old by the time it is delivered to say, Rome or Kyoto. Rulers do not always have a trusted general to lead the men either and may have specific plans as to how the wars are to be conducted. The presence of the ruler also aided morale and ensured that the soldiers stayed loyal to him.