Do employers prefer to hire younger pilots?
The answer to that has varied throughout airline hiring history.  There was a time when you'd better be young or else your chances of getting hired by the majors was essentially nil.  Now, "age discrimination" is a thing, and at least officially (in the US, at least) it is probably against policy to treat the 30 year-old ATP with 2000 hours differently than the 50 year-old ATP with 2000 hours.  (Or the 30 year-old commercial pilot with 500 hours different from the 50 year-old pilot with the same resume.)

These days, the regional airlines in the US seem to be so desperate for pilots that if you meet the minimums, it's more a matter of scheduling a class than it is scheduling an interview.  So if you're willing to fly for a regional, even the late 40-something pilot can probably get on with an airline.

Interestingly, this dynamic has its roots in the hiring practices of 30-40 years ago, when the airlines hired large numbers of "young" pilots -- meaning that the senior ranks of many majors have lots of pilot who are close in age and who are now reaching the Age 65 mandatory retirement all together.  This creates significant vacancies at the majors, who draw their new-hires from both the military (which is a fairly constant supply) and from the regionals (which has become where the "slack" has been that is now getting picked up).  The massive demand for hiring into the majors translates into regional captains moving up, and thus out of the regional airline far more rapidly than in the past.  This drives upgrade times at the regionals down, and has put pressure on their hiring departments to keep the right seats filled.

Quite literally, I was recently told that the "hiring" process at one regional has become nothing more than a confirmation that the candidate does meet the basic minimum qualifications (commercial license, 2nd class medical), and scheduling a class date.  If they pass the training, they're hired.

That is a snapshot in time in one country; throughout history that sort of a process is anomalous if not unprecedented.