Lusting and attraction aren’t the same thing. If I find a woman in the office attractive, but I take that thought captive to the obedience of Christ I haven’t sinned.
If I dwell on that attraction, if I take opportunities to watch her walk by, if I review her body in my mind at night then I have lusted for her.
The Greek word for lust in Matthew 5 is epithumeo and means to covet, desire, to long for.
I’ve had a lot of personal experience with lust. It is indeed a sin and it corrupts the heart.
It is truly amazing every discourse of Christ leads one to self examination against the standards of the 10 commandments. Jesus was truly leading everyone to examine their self-righteousness and compare it to the perfection handed down from Sinai. He spends the rest of His ministry marching towards our deliverance on Mt Zion.