Your math is fine, it's your assumptions that are failing. You're assuming that the vast majority of future terrorists fit an easily testable profile that applies to very small percentage of overall travelers. I don't see a lot of support for that position, which makes the general idea a little suspect.
There are two issues here. One is the question of moral authority. Does one have the right to profile regardless of effectiveness?
The second is if it works.
Yes, it must. You cannot dismiss that any more than Creationists can dismiss dinosaurs as some massive hoax. One may try, but it isn't going to work.
Here's how it works in biology. I'm a grad student and I'm looking for a particular gene "T". I know (because it's been previously demonstrated) that within the universe of testable organisms the vast majority with the gene "T" display the phenotype "M".
Now my task is to isolate as many "T" types as possible.
Well that's simple. In the case of bacterial colonies, I just examine all of them.
Oops, a practical problem comes up here. My Petri dishes contain 20k colonies. Crap. There aren't enough hours in the day to do that.
So my lab mate comes in and decides to help. She takes half of them and does a random search of her half. Why? Her thought is that at some point there is going to be a mutation which which will change the population and relying on "M" as a guide is no longer valid.
I get that. Eventually that will change, because that's how the real world works, and as part of my thesis I do want to understand the larger picture, so I am going to examine some of the other colonies as well. Still my primary goal is to maximize my return and therefore I take more colonies displaying "M" than the others.
So...
We have the weekly lab meeting and everyone sits down and discusses what's been going on. We look at the number of "T" colonies that she and I have found. My adviser decides to make this a bit of fun and have us bet on who has the most "T" gene colonies.
So who does the smart money bet on? It's not her.
That is exactly the situation we have here. Yes it's almost certain that there will be "T"s who aren't "M"s, but it's not possible to examine the entire universe of organisms or travelers. So yes, at some point one will get by because I was busy catching the ten others who didn't.
Therein lies the whole crux of the matter. When one has finite resources with which to examine a population, one must take a sample. If there are characteristics which improve your chances of getting the right colonies, or critical structural parts, or terrorists, nothing changes.
The only argument you can make against that is the "phenotype" changes immediately and unpredictably, rendering the whole process useless. Ok, theoretically that's correct. When "T"s stop displaying "M" characteristics then you move on. Until then you go with established facts.
Now it should be painfully obviously to anyone keeping statistics for this purpose that "drift" or change will occur over time. You sift through the data and pull out what you can and adapt as possible.
Maybe terrorists will start hiring Brazilian Catholics to blow themselves up, but this being an ideologically driven phenomenon that's not likely.
Now the argument really comes down to this.
Which is the best moral choice- Do you resist profiling on ethical grounds and let more people die, or do you profile on the moral basis that saving lives is most important?
Which do you choose? You can't have both.