Hume famously declaims, “'Tis not contrary to reason to prefer the destruction of the whole world to the scratching of my finger. ‘Tis not contrary to reason for me to chuse my total ruin, to prevent the least uneasiness of an Indian or person wholly unknown to me. ‘Tis as little contrary to reason to prefer even my own acknowledg'd lesser good to my greater, and have a more ardent affection for the former than for the latter.” (18.104.22.168)I've always thought that Hume was choosing extreme examples just to make the point. But Samuel Fleischacker discusses the saying "Fiat iustitia, et pereat mundus" (Let justice be done, though the world perish) the motto of the Holy Roman Emperor Ferdinand I (1503-1564), and, reading this, it seems at least possible that Hume had that motto in mind. If someone else were to scratch Hume's finger against his will, after all, then this would be unjust. The example of the Indian or stranger might be based on the story of the Good Samaritan. The third example is harder to relate to some satirical parallel, but perhaps Hume has in mind either the kind of rejection of worldly goods suggested by the Sermon on the Mount or else the more worldly phenomenon of loving what is not good for one, such as eating lots of veal. None of this changes the point, but it's fun to think what Hume might have been hinting at.
That is, I'm not suggesting that if Hume had these (or other) specific examples in mind that it would make a difference to the meaning of the passage. But it would add some rhetorical complexity. The very people who might object that of course it's irrational to prefer the destruction of the world to the scratching of someone's finger might be the same ones who insist that justice be done though the world perish. They might, in other words, support the very idea that they want to insist is irrational. It certainly wouldn't be beyond Hume to be wily in this way.