It’s an imperfect signal, but when you have 200 resumes on your desk, it’s a good low pass filter.
You want candidates who need to work, want to work and are capable of working. A gap could indicate any number of less desirable situations.
-Chronic health issues
-Mental health issues
-Imprisoned
-Homeless
-Not financially hungry enough
-Poor job seeking skills leading to extended unemployment
-Anti-work in some way, alternative lifestyle
-Unusually large family care responsibilities
Should you have a gap, the best way to close it is to describe career-related activities you did during your gap or other personal development. Continuing education, side projects, personal projects, interesting detours like overseas charity work.
It’s not fair at all, but you need to know how to project a “Worksona” and not being able to market your real messy life as a shiny seamless ideal worker is also a signal you’ll be less professional.
And YOU may be a perfect excellent candidate with a gap, but I promise you that among that pile of 200 resumes are a lot of barely functional people with major struggles you do not want to let into your company.