IIRC, for the first few years after 9/11 the answer to the question Why? was on the knee-jerk level - Because Freedom, and on deeper reflection - Because Israel.
Neither of those answers satisfied my curiosity.
It wasn’t until some time in the mid '00s that I read somewhere - Because Bin Laden wanted to draw the US into an unwinnable war in Afghanistan.
Obviously there is more to that story, but at least it seems to be getting at the nub of the issue.