The question that really needs to be asked is when was he highlighted as suspect? Was he profiled and questioned after he checked in then watched as he went through security; or was he picked up at the X-ray machine?
From the information on the BBC he had the classic profile that should have been highlighted the moment he booked his ticket. If it took until the X-ray machine the system had failed at the first hurdle we should thank the operators and all count ourselves lucky.