I cannot remember when NATO was a campaign issue in the US. It might be because it rarely got such high profile in previous elections, at least as far as I can recall. Indeed, it might be that my memory sucks.
The timing is both understandable and strange. NATO itself has made the uneven burden-sharing a major issue. The last summit had a visible aspiration for countries to try to get to spend 2% of their GDP on defence, with most falling short. This follows the late 2000s summits where those that bled more in Afghanistan (Canada!) haranged those that were seen as rations consumers (mostly Germany, but Italy, Hungary, Spain and a few others should have gotten the attention).
The timing is strange in that every member of NATO showed up in Afghanistan, and most expended a great deal of effort despite getting little thanks domestically or internationally. Indeed, much political capital was spent by leaders as they supported a war in which they had very little interest. Why did all NATO members show up and about 20 partners came along (Australia, Georgia, Sweden and many others)? Because the US was attacked on 9/11, and helping the US fight its war in Afghanistan was seen as their contribution to their ally. And because many of these countries hoped that by supporting the US in the 2000's, the US might meet its alliance commitments sometime down the road.
So, it was self-interest, of course, but driven by the ties to the US. And what did the US do? Gallivant off to Iraq, leaving the allies to have most of the responsibility for Afghanistan until Obama became President and surged forces there.
When I hear American politicians complain about burden-sharing, I get it, but it reflects a limited lens and a short memory. Alliances are always fraught with challenges, but NATO is the least bad. It does more than just back up the US in Afghanistan. The alliance ended a war in Bosnia, it has kept the peace in Kosovo after challenging a genocidaire (that would be Milosevic). It engages in counter-piracy off of Somalia and counter-terrorism in the Mediterranean.
Sure, the Dave and Steve book documents the challenges of multilateral warfare, that countries vary in what they are willing to do. But one key reality is that countries are far more willing to do something because they belong in the alliance and see it as in their interest to keep it going (Keohane was right). Indeed, left wing parties have to be NATO-friendly if they want to be mainstream enough to get into office (see Canada's NDP move a smidge to the center as an example with its votes on Libya).
Oh, and the US invests in security in Europe because the costs of not fighting World War III are significant but less than the costs of actually fighting World War III. Preventing war in Europe is central to American security and economic interests. Altruism it is not.
In short, Trump is wrong (duh), Sanders is overreaching, and Clinton is just responding to being outflanked.