You could make a parallel question about Pearl Harbor.
Japanese planes attacked the US Pacific fleet on Dec 7 1941, at a time when the USA & Japan were at peace, war had not been declared.
So why did the US declare war on Japan? No court of law had charged the Japanese with any crime.
Well when there is a war, that is different from a criminal accused of a crime.
It is true that bin Laden had family members in the USA at the time of 9/11, however there are a lot of conspiracy theories surrounding this. The FBI questioned and investigated each of the family members before they were allowed to leave the USA. They were Saudi nationals. The Saudi government asked permission for them to leave, and there were several levels of US government needed to give the permission.
bin Laden's family had nothing to do with 9/11.
Each war lays seeds for the next war.
During the Cold War, the West, and the former Soviet Union, ran rough shod over the rest of the world. Nothing was more important than defeating the enemy of the time. This meant that all over the world, nations were given reasons to hate the west and the USSR. Well the USSR is gone, but the reasons for hating the west are still there.
When Russia invaded Afghanistan, during the Cold War, and various groups trying to drive Russia out, the CIA supported them, including Bin Laden and his pals.
After the Russians were driven out, the rebels realized they could bring down a great civilization, and decided to do more like that.
Bin Laden declared war on the USA, in 1998.
His organization engineered attacks on many US embassies, and other places around the world, such as the US Cole warship.
I think you need to read the 9/11 commission report.
I think you also need to read some of the reports on the commissions that looked into the Pearl Harbor attack.