Suppose 1 person in a million is terrorists, and a friend of a terrorist is 10% more likely to be a terrorist than a general member of the public. That's not a lot to go on by itself, that means there's a 1 in 910000 chance that they're a terrorist rather than 1 in a million. But get enough independent variables - 100 or so, all of which point towards terrorism, and you reduce the suspects down to a few thousand most likely terrorists. This is a small enough number that more direct intelligence can be gathered on them.
Whether they should be doing this is another matter but if there's a correlation, even if we don't know the reason, between certain behaviour, then this can provide information.