You are insane. He was JAILED. He didn’t do it. Having impure thoughts of a girl he saw from a distance DOESN’T JUSTIFY SOCIETY LOCKING HIM UP FOR 23 YEARS!!!.
I think it's highly unlikely that this was the ONLY girl about which he had impure thoughts.
These things have a way of balancing out in the long run.