I don't agree that rejecting the $10 deal can be characterized as an act of jealousy or envy. Let me illustrate with a few examples less loaded than the grandma heritage one.
Variant 1:
Imagine that the mysterious stranger came with the following proposal instead: "I have $5000 to give you two guys, and I will split it randomly. You don't get to further negotiate your shares, only take it or leave it. If both accept, you get your share. If either rejects, neither gets money." Seeing that your expected outcome is $2500 and you have nothing to lose, you both immediately accept. You get to confirm that the randomization method (die rolls, roulette, computer PRN generator, whatever) is fair.
So, you both cross your fingers and hope for the best. Unfortunately for you, the dice give $10 to you and $4990 to the other guy. Uncomfortably concealing his mix of joy and worry, the other guy accepts his $4990. What do you do?
Variant 2:
The mysterious stranger proposes: "I'm feeling generous and I'd like to give away $5,000. But honestly, I like you [smiles and taps the other guy in the shoulder] better, so have $4,990$. I hope you [looks at you as if counting the nanoseconds to take his eyes elsewhere] don't mind you get $10. You don't get to negotiate, just say yes or no, now. If either of you rejects the offer nobody gets a dollar."
What would you do?
V1- I take any offer.
V2 - I take any offer.
I'd guess some people reject the offer even though it hurts an innocent guy and benefits the guy who is "unfair".