People talk about how Afghanistan invaded the US, because bin Laden trained there. But that's like saying some empty building is responsible for a drug killing because the drug gang met there. The gang is the problem, not the building. 9/11 was really a criminal matter, not a military one. But Bush and Cheney were probably right that the American people wanted a big military response, especially since all the hijackers died,and there was no one to hold legally responsible except bin Laden.
Woodward's book emphasizes the importance the whole Obama administration placed on naming McChrystal as Afghanistan commander. When he had to be removed it must have been devastating.
Bush, after invading Afghanistan with a few special forces troops, sent in a few regular troops, and then basically abandoned the war to start a new one in Iraq. The one thing he needed to do in Afghanistan was find bin Laden, but he failed to do it. He left a rump American force there with insufficient guidance and resources. This was terrible for the military, essentially assigning them to a waste of.lives and money, with no possible desirable outcome. Obama gave the military the chance to make something out of Afghanistan, but it's questionable whether that is possible. In any case, so far the military has failed to make progress, even with more resources.
When Obama began to focus on Afghanistan, he and his advisers began to give Pakistan a higher priority as a threat to US interests. Thus, the strategy for Afghanistan was controlled by what effect it would have on Pakistan. Seen this way, US policy for the war was backhanded, sort of like pushing on a string. And Afghanistan once again was second fiddle to another country, this time Pakistan instead of Iraq.
Underlying the debate is the military's need for a war to justify it's existence. The military gets a lot more money, power and attention in wartime than peacetime. So, it's not surprising that it would encourage any war for any reason.