The BBC article clearly states the reason for the security concern:
The reason, the agent allegedly said, was that Mr Abdallah "went to the restroom and... flushed twice".
So it's not a matter of profiling but rather evidence-based. Have you ever flushed twice on a plane? Of course not. Many people don't flush even once.