So did anyone ever figure out what our countries were doing bombing the crap out of Afghanistan and Iraq? I know military soldiers that were there that still have no clue.
It was a war to try and establish government control over contested areas. A tribal war, if you will. Most Americans have no idea that this is the essence of the conflict in that entire region.
We bombed the crap out of Iraq to destroy the "WMD's" and get Sadaam out of power and then we spent years and years rebuilding what we ruined and trying to help the new Iraqi government take hold and establish itself against the rebels. Now, ISIS has moved in and erased a lot of what we had accomplished. Essentially, we ruined that country and should have left it alone.
Afghanistan's issue was Al Qaeda and the beginnings of what would become ISIS, effectively trying to assert itself and begin controlling different areas of the country, which we worked very hard to prevent. However, these types of tribal conflicts cannot easily be solved with bombs and force. These are "hearts and minds" campaigns that, when they fail, end up being costly wastes of time and lives.