Against whom? In practice, NATO is an offensive alliance: Afghanistan, Libya and Bosnia were not defensive wars.
NATO military spending already dwarfs that of any potential rival. Every dollar spent on the military is a dollar not spent on social programs, hospitals, schools, and other things that actually improve people's lives. Rather than pressuring everyone to ratchet up military spending, the world would be much better served by disarmament.
The NIH, NOAA, CDC, National Science Foundation, EPA, food stamps, farm subsidies, low income housing, and anything Obama ever cared about are obviously just wasting taxpayer dollars. But we need those extra aircraft carriers.
Yes, Europeans should invest more in Defence, but not in NATO, which should be let to fade into history.
The military is the strong arm of the political power. Giving a military branch to the EU would seal the deal in terms of creating a federal state.
This is why such initiatives are very limited and often more symbolic than anything else (e.g. Franco-German units) because sovereignty and control are very tricky matters to handle.
Then some countries, notably Germany, have issues with military power for historical reasons.
This "2%" figure is a top contender for "the biggest load of bullshit in politics" award, I (as a German, if it's relevant) hate it with a passion.
The reason is simple - all this target does is incentivize waste and disincentivize control and oversight. After all, if the only thing that's compared is how much money was spent... what's to keep states from blowing the money on bullshit and hoping that the US will save their butt once again?
What would be way better is to define goals on capability targets. Like... France being responsible for having one combat ready aircraft carrier, Germany 200 tanks, UK 7 nuclear submarines. That way governments would be incentivized to keep the vendors accountable to deliver safe and working products at reasonable cost, instead of basically letting them do whatever the f..k they want and milking the taxpayers for shit like marine helicopters that aren't certified for flight over sea (German NH90 scandal).