They keep killing us so we’ll have a reason to hate them, which will then give them an EXCUSE to hate us! :P
Terrorism is a tactic. They do it because it seems to be so effective towards their desired end, which is to bend our will to theirs. In a sense I think it is true that they do it because we don’t know why they do it. If we responded IN KIND, with the slightest fraction of our capability, it would take all the fun out of it for them, but this is anathema to us.