That's a good point that I hadn't considered.
It would be much better if they directly measured the impact of this on cities though, particularly because the reaction to terrorist attacks is vastly different (see the difference in German and French reactions, for example). In fact, it could then penalize heavy-handed responses even when there hasn't been a terrorist attack. For example, the US maintains some draconian security measures and a police state mentality even though there haven't been any recent terror attacks (does every single MTA rider really need to be constantly reminded to watch suspicious packages?).
For that matter, I'm confident that you're quite safe from terrorism in Dubai. But the ranking should really include the dramatic security apparatus/environment which is in place to maintain that safety.