Since it's illegal to hire based on the results of an IQ test in the US, we have to come up with other proxies for it. So, we use stereotypes that are associated intelligent individuals as filtering criteria. Gender provides one of those stereotypes - in both directions. Men have traditionally not been considered for jobs like nursing or caretaking. Women have traditionally not been considered for jobs which require physical strength or analytical skills.
But back to your original premise: when you're evaluating hundreds, or thousands, of applications for a single opening, you're going to fall back on stereotypes, because it's too much work to do otherwise. Gap in employment longer than a few months? Skills have expired. Lots of job hopping after 6-18 months? Unreliable. Only has worked for companies known for their physical labor? Not capable of working in an office. A short job history with no college? Not smart enough.
Even though every single one of those is potentially wrong, it's also potentially correct. If you need to weed 100 applications down to 10 for phone interviews in the next hour, can you really afford to give each of the 100 applicants the benefit of the doubt?
EDIT: Removed "intelligence", replaced with "the results of an IQ test", which is what I meant originally. Apologies.