They were wrong.
They thought that attacking Spain on 3/11 would change that country's policy and, ultimately, their presence in Iraq.
They were right.
They thought that attacking England on 7/7 would cow the Brits into pulling out of Iraq and Afghanistan. They thought it would serve as a warning to Italy and Denmark to do the same.
Time will tell.