People who become good/great mathematicians, or practicioners in "pure/theoretical science" (together with their intelligence, their "knack for it") often do so in large part because their personal circumstances from birth have freed/enabled them to pursue abstract, contemplative activity not (seemingly) directly tied to immediate/medium-term survival and fluorishing (reproduction, socialization) needs. If you're trying to avoid being killed by the drug cartel or just trying to hold down a pleb job while not crashing the car on an hour commute, you often don't have the surplus mental energy or inclination to begin with, to engage in any such higher-level abstract contemplative activity. Leisure time is instead shunted into consumerism, or better creative "hobbies".
I don't want to confound cause and effect, nor do I mean to discount exceptional cases. Grothendieck survived the holocaust and had to learn to scrap and fight in soft-core "holding camps" as a child. Ramanujan was innately one-in-a-billion. People get sick and die (Maryam Mirzakhani). Galois. It's just that longevity and the capacity to engage in a certain form of sustained, high-level abstract contemplation seem to me to be directly related, for the sociological and socioeconomic reasons just cited. I wonder if a study has been done.
"The science of government it is my duty to study, more than all other sciences; the arts of legislation and administration and negotiation ought to take the place of, indeed exclude, in a manner, all other arts. I must study politics and war, that our sons may have liberty to study mathematics and philosophy. Our sons ought to study mathematics and philosophy, geography, natural history and naval architecture, navigation, commerce and agriculture in order to give their children a right to study painting, poetry, music, architecture, statuary, tapestry and porcelain.” -John Adams. OTOH, this noble quote hints the "weak men create bad times" moment in the cycle...