Definition of Terms
Since this question has used the Greek quotation of Matt. 5:27-28, let's look at the words being defined:
μοιχεύω(moicheuó) to commit adultery with, have unlawful intercourse with another's wife: Matthew 5:28 (Thayer's Lexicon)
ἐπιθυμέω(epithumeó) to set one's heart upon) to have a desire for, long for; absolutely, to desire (A. V. lust")(Thayer's)
What is apparent is that these 2 words do not mean the exactly the same thing; "moicheuó" is definitely a violation of the 7th Commandment(Thou shalt not commit adultery), whereas "epithumeó" is interpreted as "having a desire for", which Jesus uses in Luke 22:15,
καὶ εἶπεν πρὸς αὐτούς Ἐπιθυμίᾳ ἐπεθύμησα τοῦτο τὸ πάσχα φαγεῖν μεθ'
ὑμῶν πρὸ τοῦ με παθεῖν
And he said unto them, With desire I have desired to eat this
passover with you before I suffer:
The "ἐπεθύμησα" (I have desired) is in an of itself not a bad connotation; in the context of marriage Paul states,(1 Cor. 7:5)
Defraud ye not one the other, except it be with consent for a time,
that ye may give yourselves to fasting and prayer; and come together
again, that Satan tempt you not for your incontinency. 6But I speak
this by permission, and not of commandment
To have "desire" inside the context of marriage is 1 Cor. 7:33,
But he that is married careth for the things that are of the world,
how he may please his wife.
So we see that "ἐπιθυμέω" in and of itself does not denote an negative connotation; how then do we evaluate Matt. 5:27-28?
The 10 Commandment
The context of "coveting thy neighbor's wife" was contained in the 10th Commandment,(Ex. 20:17)
Thou shalt not covet thy neighbour's house, thou shalt not covet thy
neighbour's wife, nor his manservant, nor his maidservant, nor his ox,
nor his ass, nor any thing that is thy neighbor's.
תַחְמֹ֖ד(tahmod)in bad sense of inordinate, ungoverned, selfish desire, followed by accusative Exodus 20:17(BDB)
The precedent for "covetousness" is in the 10th Commandment, which, unless outwardly acted upon, is a "sin of the heart", therefore it is incumbent for men(and women) to 'police' their hearts, lest their "ungoverned selfish desire" carry them away into committing the 'overt' actions(fornication, theft, adultery, etc.) Furthermore, covetousness is equivocated with idolatry; in numerous instances Israel was admonished not to 'fornication' in the worship of false gods,(Ex, 34:15)
Lest thou make a covenant with the inhabitants of the land, and they
go a whoring after their gods, and do sacrifice unto their gods, and
one call thee, and thou eat of his sacrifice;
When one allows "inordinate, ungoverned, selfish desire" to overtake themselves, the next step is "fornication" or "adultery", whichever the context is, as one makes an 'idol' out of what one desires, putting it ahead of God and His commandments.
It is in this context, one of "תַחְמֹ֖ד" that Jesus is basing His words on: to have "desire for"(attraction) is not in it's essence sinful(this is better than repulsion), rather, it is "coveting"-an inordinate unruly passion which seeks consummation which was already prohibited in the Law, and Jesus emphasizes this in Matt. 5:27-28.