The background to 9-11 and al-Qeada is complex, but here is part of it. At the end of the 1970s, to forestall a change in government, the Soviets seized Afghanistan, beginning a ten-year war which led to a serious failure of the Soviet Army. Meanwhile, while selling weapons to both Iran and Iraq during their war, the US and Britain offered covert help of many sorts to the mujahadeen (or "muj" for short). This included advice from former military personnel, operations by contract agents, and supplies of arms bought from China, Bulgaria, etc. and "given" to the muj. The Jamiat-i-Islam, early in the war, were involved in the opium business, and the fighters in the Panjir Valley we worked with later on were in the hashhish business. It would be naive to pretend these products were not instrumental in paying for the weapons.
To launder funds and raise recruits from the Middle East to fight in Afghanistan, the US used a Saudi financier, whose name was Usama bin Laden. The bin Laden family was largely in the construction business in Arabia, and had financed many projects through international banking circles, including businesses associated with the Bush family. This could easily sound like a conspiracy theory, but most large international businesses use the same banks. The important thing is that bin Laden kept in touch with the ex-muj mercenaries, and gradually formed this group into al-Qaeda, which means "the Base", as in "foundation". On this foundation he intended to create a pan-Islamic, revolutionary and fundamentalist state in place of the current Mid-East states.
The 9-11 strike was planned in the Phillipines, and some of the planners were captured by Phillipine security shortly thereafter. The government warned the US, and these warnings found their way into newspapers across Europe before 9-11. Several intelligence agencies also warned us, but again let's not jump to conclusions. It is very difficult to attract the attention and change the opinion of a government. Where the National Security Council had spent the years under Clinton carefully uncovering al-Qaeda, Bush's people were convinced Saddam Hussein was at the heart of all international terrorism. We know today they were wrong.
The theory that the US and other Western countries never deal with terrorists is false. The Reagan and first Bush governments both sold weapons to terrorist groups in trade for hostages. Richard A. Clark, former chief counter-terrorist adviser to the National Security Council, has written an excellent book on the responses to terrorism by the US from Reagan to the early "W" years, entitled "Against All Enemies," which I strongly suggest. The idea that no one imagined terrorists would use airplanes is ridiculous, I myself read warning of this by FBI anti-terrorist experts in the late 1970s.
As to why extremist fundamentalist muslims dislike America, look around at the mass consumer culture, with rampant use of overt sex to sell everything from television sets to, well, sex. This offends many people. Here in America, as in many countries in Europe and Asia, if we dislike something we generally ignore it unless it is in our face. But some right-wing extremist Christians apparently cannot do this, and so complain about and condemn it. Same with the extremist muslims. Many feel the corporate greed of Wall Street is destroying the world, and fear change in general.