Terrorism is created when people are cornered and feel they have no other option, vastly outgunned and outmanned. Oh there's a great hue and cry that the dishonourable terrorists aren't standing there getting mown down on a field of battle like proper upstanding folk, but they chose to win rather that die. It was the same in Ireland, the same in the Middle East, the same in Vietnam, the same everywhere some farmer puts down his plough and picks up a sword after his last child steps on a mine. If you want to stop terrorism stop going out there fucking with other countries. Simples!
Sun Tzu's Art of War, Chapter VII, # 36:
When you surround an army, leave an outlet free. Do not press a desperate foe too hard.
Some translations I have read word the second sentence like "desperate men will fight very hard".
I believe our leaders (the ones you see on TV who run for office, and the powers behind the throne that actually get those into office) understand these things. They're despicable, sociopathic, without morals or ethics or qualms, and completely dehumanized, but they are not stupid. If you really want to understand "why they hate us", you can start here. A little research will reveal that we've done things like this all over the world, particularly in South America and the Middle East.
That leaders who certainly know the same thing can stand there before the nation and say things like "they hate us for our freedoms" with a straight face is a level of cold-blooded that most people could never imagine.