Older Than Feudalism: The Book of Job is one long tale of horrible misfortunes that beset a decent, pious man because God and the devil made a bet on whether he could be broken. He did break, but not quite as far as the Devil wanted him to. Satan's goal was for him to say "Fuck you, God" as a subtextual request for a mercy-killing (or as his wife puts it, "Why don't you just curse God and die?"); he settles for cursing his own existence.