Unfortunately for your thesis, we’ve been attacked by Muslims for a longer period of time than a) Israel has existed, b) we’ve had bases in Saudi Arabia (at their request!), c) any other silly scenario you can come up with to blame America first.
The reasoning behind the invasion of Afghanistan (not nation building) was to find and kill those who were behind 9/11, namely Al Quada. We’re debating why Al Quada, a Sunni-Wahabbi group based out of Pakistan, has been at war with the west. We’re not debating some silly ass argument that African pirates 220 years ago are somehow the same as Al Quada. Did you even bother to read OBL’s Fatwas? Or did you simply stick your fingers in your ears until Mark Levin came on? There’s no mystery whatsoever why they hate us.