Disability claimants often ask representatives why they have to have worked at least 5 out of the last 10 years to be "insured" for Social Security Disability (SSDI) benefits. When you work, you pay premiums (through FICA) to the Social Security trust fund. If you stop working, those premiums aren't paid any longer. SSA uses your "quarters of coverage" to calculate your "Date Last Insured" which sometimes can be five years after you stopped working. You must prove that you became disabled prior to this date. The Social Security Disability Insurance program was created to be social insurance; not welfare.
This article explains why some get SSDI all wrong: