True, but the wars also taught the islamic radicals a lesson: The West, and particularly the USA, can be worn down and can ultimately be beaten.
The radicals now believe that history is on their side, and they are right. They are emboldened everywhere, and pushing everywhere.
It wasn't the wars that taught them that; it was the division on the homefront.