The vast majority of what appears to be "pure altruism" probably isn't. "Reciprocal altruism" or "tit-for-tat" is common but is not really altruism. There is something called "kin altruism" where altruism within the kin (i.e. first or second degree relative) would be an evolutionary stable strategy (i.e. for the genes). Given the human cultural layer, this can be hijacked where family metaphors are used to trigger altruistic behavior. Hence why [some] priests are called "fathers" and [some] gang members call each other "brothers".
Another possible form of altruism may be lurking deep in our programming whereby if a human feels they are "worthless" or "dead anyway" then they may be triggered to commit suicide(*) or to sacrifice themselves in battle. Keep in mind that for almost all of human history, population densities were low and tribes were generally engaged in a zero-sum game for land/resources. This would be a form of lineage-level (i.e. not population-level) selection which is highly controversial but makes sense to me.
This can be modeled and simulated to some degree so it is not entirely hypothetical.
(*) To free up resources for more confident humans to reproduce with, I suppose.