There are the stated reasons for why 9/11 happened, and then there are the more likely deeper reasons.
I once read a book by a vagabond who deliberately ventured into many of the world's danger zones and interviewed all sorts of suspicious characters from narco-traffickers to terrorists. He once described terrorists as "rich kids with issues", and that description has stuck with me, because it seems to describe Bin Laden to a tee. OBL was one of something like 40 or 50 children, sired by a super wealthy Saudi construction magnate who was tight with both the Saudi royals and the United States government. He grew up around lots of money, but he probably didn't get a lot of quality time with his biological father and mother and probably had to compete for love and attention (sounds like another rich guy we know).
From what I've read of his early life, Bin Laden was a devoutly religious person and he was attracted to the themes of jihad, which would not necessarily have foreshadowed who he became, but the genesis was there early on. A lonely guy, with more money than affection, seeking to fill that void through other things and connections with other people. He probably harbored resentments toward his family, and perhaps being a religious shit-disturber became his way of getting back at the world, particularly his family and the friends of his family.
By the mid to late 1970s, Bin Laden's looking for some meaning in his life beyond being a husband and father. Given his inherited wealth, he wanted commensurate stature to go along with it. How would he get it? By being an Islamic warrior fighting to defend Muslims in Afghanistan. He and his billions went to Afghanistan initially to join on the front lines, but he also became recognized by Pakistani, Saudi, and US intelligence services as an unofficial but potentially important political figure, someone who could liaise between the Pakistani ISI and the Mujahedeen warriors.
Bin Laden's claim to fame was in the battle of Jaji, which is regarded by some as the battle that pushed the Soviets out of Afghanistan. He became a recognizable hero in the Arab press as a result. He became an idol to many, and I'm sure his ego and his sense of self-importance probably took off.
To understand the reasons behind 9/11 I think we have to go back to why Al Qaeda was formed in the first place. Bin Laden had been supported with millions of dollars in foreign aid from the US, Saudi Arabia, and eve China that, while not directly provided to him, was given indirectly via Pakistan's ISI. He also returned to Saudi Arabia a cult hero and icon, and as a religious radical he posed a clear and present danger to the Saudi regime, and he was involved in numerous opposition protests and/or coup movements in Saudi Arabia, Yemen, Afghanistan, and Pakistan. He saw his Al Qaeda as his own army of Allah.
The real split between the US and Bin Laden occurred when Saddam Hussein invaded Kuwait and threatened to do the same to Saudi Arabia, which drew an immediate US response. The US was Saudi Arabia's (and later Kuwait's) protection. Bin Laden insisted that non-Muslims shouldn't be relied upon for protection, particularly on 'holy' land (Arabian peninsula). The House of Saud disagreed and it wasn't long after that Bin Laden became involved in attacking first the US military, which he did for years, before progressively upping the stakes to civilian targets both abroad and in the US. 9/11 was really attempted years earlier in 1993. 9/11 was the bookend.