“Bavarian authorities determined that Trump had emigrated from Germany to avoid his military-service obligations, and he was classified as a draft dodger.
[3]:98 On 24 December 1904 the Department of Interior announced an investigation to expel Trump from Germany. Officially, they found that he had violated the Resolution of the Royal Ministry of the Interior number 9916, an 1886 law that punished emigration to North America to avoid military service with the loss of German citizenship.
[3]:99 In February 1905, a royal decree was issued ordering Trump to leave within eight weeks due to having emigrated to evade military service and failing to register his departure with the authorities.
[16] For several months, Trump petitioned the government to allow him to stay but he was unsuccessful.
[3]:100”
Whether he was actually avoiding military service or not is speculation. But his grandson almost certainly used a fake medical diagnosis to avoid the draft.