Our Gemara on Amud Beis presents certain ideas about desire and psychology. It states that there are two constant desires that plague people to an extraordinary extent: Theft and sexual relations. Presumably the Gemara is referring to rationalizations that people often commit to avoid making full payment, paying back loans, trespassing and similar ways of not respecting others’ possessions and keeping financial commitments. The Gemara notes that there is a difference between the desire to steal versus sexual lust. The desire to steal occurs in relation to an object seen, and after that there is a craving to possess it. However, sexual desire occurs whether being visually provoked or even without any stimulus.
Tosafos (Sotah 8a) raises a contradiction from the Gemara in Sotah which suggests there is only desire for that which the eyes have seen. The case over there involves the body of a woman who is given the death penalty but may be exposed during the process of execution. The Gemara questions, could not the sight of her cause people to have sexual fantasies and act out with others who are alive? To this the Gemara answers that, “evil inclination controls only that which a person’s eyes see.” Tosafos answers that the Gemara in Chaggigah is referring to the power of the imagination to resurrect that which was once seen and desired, and make it real. However, the Gemara in Sotah is referring to the concept that a person won’t desire something that was NEVER seen.
Tosafos’ idea that the imagination can make something real in the arousal process is supported by neurobiological research. Under functional MRI brain scans, researchers are able to follow the brain and nervous system pathways that lead to sexual arousal and function. There is a complex relationship between local stimulation coming from the sex organs, the visual cortex and the cerebral cortex. The research indicates that mental processing of ideas and associations, as well as mental imagery play a role in arousal and not mere physical stimulation. ( See https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3960033/ )
Additionally, while Tosafos is applying its classic dialectal style of resolving contradictions via making distinctions between the two sources, I wonder if there isn’t a simpler psychological answer: There are different components to sexual desire: 1. A sex drive that is independent of a sexual object to lust after. 2. There is the mechanism in the human mind that sees something and then desires it. In terms of lusting for a desired object, the Gemara may hold that it requires seeing it, or according to Tosafos at least having seen it and then out of memory desiring it. However, our Gemara in Chaggigah could be simply be referring to the sex drive which is often independent of any real or imagined object.