Independent of marriage, Even HaEzer 22 reminds us of the need to avoid all wrongful sexuality, to seal ourselves from any position where it would be possible to fall prey to our lesser selves. The main strategy, a matter of Torah law, is to never be where a couple could yield to such desires, called yichud, where two people are alone in a place where they could consummate a relationship.
Torah law covered yichud for arayot, couplings prohibited at a level of karet or death penalty (including, of course, adultery). David and his court equated the (already in Tanach, AH argues) ban on yichud with an unmarried woman to the Torah-level yichud with arayot.
The idea arises again at the end of Even HaEzer 119, divorced couples who may not remarry (the wife has married someone else in between, whether or not she is currently married to him; a kohen who cannot marry a divorcee, including his own ex-wife) should generally not live near each other, for fear their relationship has not ended enough to prevent them from themselves having an affair.
People are meant to live in marriages, our Even HaEzer has told us, to continue populating the world, because of its inherent value, and to tamp down urges we might give bad vent to if we are not married. We therefore needed to learn how to set ourselves up not to fall prey to such urges when they are disallowed, how to enter marriages which are the only proper outlet for those desires, to celebrate them properly, when they need to end, and how to end them.
The Even HaEzer we saw so far.