According to PBS.org, this data is culled from the "Social Security Index" which probably means the SSDI or Social Security Death Index. This is also known as the Social Security Administrations Master Death File. You can find out more about this file by searching for it by name on google.
"Do not assume that simply having died or having had a Soc Sec number means your
name will appear in the SSDI! The SSDI is basically those people for whom a
death benefit has been paid!
Any decedent whose relatives did not file a claim, or did not have that claim
approved, may well not show up. Further, it helps if the decedent was paying
in to Soc Sec -- many union members, tradesmen, teachers, policemen, railroad
workers had their own, non-govt retirement funds. Next, to qualify for Soc
Sec benefits, one needed 40 quarters/10 years of contributing to Soc Sec...and
Soc Sec only BEGAN in 1934, so collecting only kicked in starting in 1944
(retirement, that is, not disability or death). LESSON: The SSDI is not
all-encompassing; it is what it says it is, only."