Why was Sisyphus of Greek mythology punished?

It is well known that Sisyphus was a king in Greek mythology who was punished in Hades by having to roll a stone forever up a hill, only to have it roll back down.

It is less well known that he was given this sentence as punishment for cheating death.

Sisyphus, a king of Corinth, was a master trickster who planned the ultimate prank.

He told his wife that when he died she was to dishonor his body.

Upon his death, she did so.

He used the affront as an excuse to come back to life, supposedly for the purpose of punishing his wife.

When he returned home to her, he stayed, and lived a second long, full life.