Voters in all jurisdictions have almost always embraced military heroes. Caesar never would have become dictator of Rome without Gaul, nor Jackson president of the US without his various campaigns. When with WWII, continuing into the Cold War, the US government rediscovered that war and militarism are perhaps the most effective ways to expand, take extraconstitutional authority, and accumulate wealth & power, military service was ensconced as a de facto qualification for office. That didn't apply to the presidency alone, it spread to congress, even to judicial appointments. If you didn't have a service record, you might as well not waste your time seeking a nomination.
That unwritten requirement began to evaporate with the unpopular Viet Nam War. When universal military service was ended and the US shifted from manpower to technology to maintain its prowess, the ground of it fell away. Still, it lingered in the public mind, largely with the WWII generation, which is now dying out. Presidential candidates through Kerry continued to attempt to paint themselves as military heroes. His campaign also made the first partisan attempt to make service a negative for his opponent. That theme continued through the next election. It didn't work politically. Most Americans now never having been in uniform, the public no longer relates to it well. For this election the theme appears to have been dropped but for a few party loyalists who seem not to have gotten the memo.