Hormones modify behavior. We're just misunderstood. Again, this is a testosterone thing. Besides, women do it as well. Women are just much better at not getting caught.
Women take one quick look and memorize it for later reference.
Since men lack this ability, we try to burn it into our memory by staring as much as we can. We occasionally need to adjust our little friend and make him happy. It's much like adjusting your bra. Being in public is just an added bonus. We like to.