The military has spent decades working on a general aptitude test, called the ASVAB [1]. It's a score up to 99, which is usually what people focus on, but there are also line scores for things like electrical and mechanical. When you join, there'll be a score range you'll need to be in and possibly certain subtest scores.Generally speaking, you've needed a minimum ASVAB of 31 to join the military. Recruiting stations will have quotas of only accepting so many below 50 so if you're below 50 you may have a more restrictive choice of job, even though you qualify, because you're an undesirable candidate. You take up a valuable sub-50 slot. Oh and below 50 and the Air Force won't even sneeze on you. They don't have to take you. They have more than enough applicants.
This can go the other way too. You can score too high for certain jobs such that they won't want to sign you up because you'll get bored. This is way less common obviously.
Every area of the country is covered by a recruiting station ("RS") for each branch and is staffed by recruiters who usually aren't volunteers (eg most marines on a re-enlistment after an initial 4 years will have to do a Special Duty Assignment--SDA--and will end up as a recruiter or a drill instructor). Each recruiter will generally have a quota to fill of 2 contracts per month.
In some areas (eg Texas) this is no problem at all. Recruiters can be picky. In others, it's way more of a challenge. Anyway, a few years ago the enlistment numbers for the Navy must've gotten so bad that for awhile they were accepting an ASVAB of 10 [1]. 10 is bordering on illiterate.
I say this because raising the maximum enlistment age to 42 is almost as desperate as lowering the ASVAB minimum to 10. I cannot imagine a 42 year old E-! in basic getting yelled at by a 23 year old DI. You won't be doing 20 for the pension. I guess you'll get the GI Bill after 3-4 years. That's something I guess? Most other 42 year olds you'll meet will be near or beyond their 20 years.
[1]: https://taskandpurpose.com/news/navy-recruiting-afqt-asvab-s...
[1]: https://en.wikipedia.org/wiki/Armed_Services_Vocational_Apti...