YALP, I know I don't really want to hurt anybody. But, those thoughts that you have. Then I look around, knowing just the thought was sin. You question how anyone could tolerate you if they knew your thoughts. Then I am dumb founded that God loves me.
I was taught that thoughts are like playing chess. You have to think of everything multiple steps out for cause and effect (right and wrong, good and bad, moral and immoral) to understand the correct solution to a problem or circumstance. A normal mind can process cause and effect to eliminate the wrong answers. Even wrong answers can create paths or trigger other thoughts to process again for cause and effect which can generate right or wrong paths to explore for even more paths.
Some minds get stuck in loops that prevent any action and some minds kick themselves out of the loop so they don't cycle. Sometimes they kick out of the loop and land on the right path and sometimes they don't.
A normal mind will be able to limit the processing to a limited set of solutions based on the desired outcome. This is also affected by a known set of good and bad learned as the mind develops.
As Rat said, it's not the thought that is good or bad, it's the action. Without immoral thoughts, there would be no moral thoughts and visa versa. We learn what is good and bad.