It obviously depends on the airline and their policies. A good friend of mine at a US major was hired as a flight attendant before he was old enough to be hired as a pilot although he had the required experience. They gave preference in interviews to current employees, and he became the youngest pilot ever hired there.