Those who gaze at immodest images generally know it is bad for them. If it is not a conscious knowledge it is subconscious, but in my opinion it is there. It has many negative side effects from physical health to moral health.
Why do it if it is so bad? Isn't there something better to do with that time other than to set oneself back?
We all have negative tendencies (evil inclination) that want to destroy us if we allow them. They tend to grow stronger if we don’t oppose them.
"In the beginning , the passions are as travelers carrying out a brief stay among us ; then they are guests who visit us daily and ultimately they become masters of our will ." Avot de Raba Natan 89
It is not that we don't realize it is destructive and causes problems, but it is very difficult to fight. One has to muster the strength to deal with this issue if you have difficulties with it.
The best way to fight it is by daily Torah study:
Even so did the Holy One, blessed be He, speak unto Israel: ‘My children! I created the Evil Desire, but I [also] created the Torah, as its antidote; if you occupy yourselves with the Torah, you will not be delivered into his hand."
I would say this fight is well worth fighting. It becomes easier in time because of the strength of positive habits and because one finds one is helped as he tries.
" If a man sanctify himself a little, he becomes much sanctified. [If he sanctify himself] below, he becomes sanctified from above; :" Yoma 39a
It produces many wonderful results in place of the other things you didn’t go after.