Here's the history of the rule, which dates from 1970.
https://en.wikipedia.org/wiki/Ingravescentem_aetatem
In prior times, when life expectancy was shorter, it was less likely that physical health would outlast mental health to the extent it happens in modern times. The rule is probably, to some extent, a recognition of that current reality. One concern is public confidence in the result of the conclave. Of the current cardinals 115 out of 252 are 80 or older. One thing the church does not need is a sentiment among its believers that the product of a conclave is the product of senility, even if it's clearly the case that some (but clearly not all) people retain full mental faculties into their 90s or more.
Also, because clergy at all levels are expected to resign at 75 from their jobs (not their clerical status), keeping cardinals eligible until 80 takes adequate advantage of seasoning and experience before nature threatens mental capacity. It is admittedly an arbitrary line, but substituting a case-by-case determination of eligibility would threaten to bring too much subjectivity, or at least perceived subjectivity, into the process. Also, the cardinals who are ineligible to vote can still take part in the discussion meetings that happen before the conclave itself and share their views, so their wisdom is not entirely excluded from the process.