In countries with French-style law, that might be different for pilots. (Essentially you're guilty until proven innocent, and they hire a retired judge with nothing better to do except to drag out the hearings (and fees) until they die.)
However the scale has tipped recently in the US with a central pilot records database being created recently. So at every step of your career, you're recorded and tracked. If an employer doesn't like you, they can scribble whatever they want in your permanent government record now.
So before a pilot candidate spends $200,000 on a college education and pilot training, they need to think about both losing their medical at any time, and what will happen if their airline decides to fire them and give them a hard time.