Hitting the Trail
Part of the beauty of swing states is that the information gives campaigns a better idea of where to deploy quickly diminishing financial resources. Obviously, a campaign is going to spend the most money in places where it will create the greatest impact. If a candidate knows he or she has little chance of flipping a state, the campaign is unlikely to spend much money on advertising there.
If a state was decided by a few thousand votes in the last election, it's easy to see why it's important to campaign in that state, but that's not the only reason why a candidate visits a state. Demographics play a big part as well. Candidates might need to speak to a key constituency that has a large population in that state. Or maybe they want to make a policy point at a particular location, like when President Donald Trump visited a major roads project in Atlanta to talk up transportation infrastructure. The strategy involved in a candidate's movements are multifaceted and usually calculated.
Campaigns do visit non-swing states, however, and the reason is simple: money. High-priced campaign events can raise millions of dollars, which can ultimately help pay for campaign advertising in other states.