Nir Eyal explains the concept of a precommitment using the story of Odysseus from the Odyssey: Odysseus has his crew plug their ears with beeswax and ties himself to the mast so he cannot act on the Sirens' tempting song. The example illustrates making a decision in advance to avoid distraction and ensure goal-directed behavior.
Chapters
So the story that I talk about in the book is the story of Odysseus in the epic tale of the Odyssey. Now Odysseus is captain of a ship and he has to sail his ship home past the island of the Sirens. Now the Sirens are these mythical creatures that sing this song that anyone who hears the siren song crashes their ship onto the shore of the Sirens island. Now what does Odysseus do? He tells everyone in his crew to put beeswax in their ears so they can't hear the siren song. And he tells them to bind him to the mast of the ship. And he says, no matter what I do, no matter what I say, don't let me go. And you know what? His plan works. He's able to sail his ship right past the island of the Sirens and return his crew and his ship safely home. How does he do this? Because he made a pre commitment. He decided in advance what he is going to do when he's tempted by distraction.