I'd suggest that failing to discover a fatal disease would be slightly worse than failing to travel somewhere.
What you mean to say is that it's OK for a doctor to do it because in that case the recipient believes he is doing it for a good reason. If everyone going through an airport fully believed that these checks are an efficient way to ensure our safety in the air, far less people would have a problem.