That is a really old, old story, goes back to the Middle Ages I think, and still relevant today.
Related to the “Frog and the Scorpion” story.
It’s one of Aesop’s Fables.