The 9/11 attacks did make the stock market drop quite a bit, although nothing like the stock market dropped during the financial crisis that hit at the end of 2008.
The reason that it dropped to some extent was the uncertainty over what was going to happen next. Businesses really need certainty, or as much of it as they can get. When they do not know if there will be a war, or what will happen to the price of oil, they are not happy. Investors worry about how businesses will do in such a climate and stocks drop.
So stocks dropped for a while as investors waited to see what would happen next.