Ibn Ezra, in his commentary on the verse, “Do not covet” (Ex. 20:14) writes that just as it does not even occur to a simple peasant to covet the royal princess, that is how it should be regarding a married woman.
The peasant is not beset with dreams about the beautiful princess; he does not even think about her.
Perhaps there are princes who are interested in her, but the simple peasant is not.
When something is entirely beyond a persons reach, he simply does not think about it, does not seriously consider it.
Because of this, there is neither an element of temptation nor a need for a struggle.
Similarly, “your neighbor’s house,” “your neighbor’s wife,” and similar objects of desire should be seen as outside the realm of the permitted, in the realm of the completely forbidden.
To be sure, the very transition to a life of Torah and mitzvot requires a momentous, fateful decision, but ultimately such a life provides, in certain respects, a great deal of calm.
To put it more profoundly:
A world where God exists is a world of peace of mind and security.
A world where God does not exist is a world that is fraught with anxiety and insecurity; it is like an endless maze.
–Rabbi Adin Steinsaltz