"'Do not explore after your heart and after your eyes after which you stray' (Bamidbar 15:39) - after your heart refers to heresy, and after your eyes refers to sexual immorality" (Berachos 12b).
In order to avoid believing ideas that are antithetical to that which the Torah obligates us to believe, we must limit our thought and place a boundary for it to stop (Rambam, Sefer Hamitzvos Negative Mitzva 47). We may not even contemplate a thought which can cause a person to uproot one of the fundamentals of Torah. If a person thinks about these ideas critically, his limited mind may conclude that heresies are true; he may doubt the existence of Hashem, the truth of prophecy and the Divine source of the Torah (Rambam, Hilchos Avoda Zara 2:3). Such contemplation is prohibited even if no heretical conclusions are reached.
Unfortunately, the prescience of the Rambam has been borne out dramatically in our time. The zeitgeist of post-modernism and non-judgmentalism has corroded the allegiance to basic Jewish beliefs even within the Orthodox Jewish community to the point that nothing is considered sacred and nothing is considered certain. Our youth are particularly vulnerable, more so than in medieval times when the Rashba (1:415) prohibited studying philosophy before the age of twenty five. Too often the beliefs of high school students are weakened by those who subject fundamental beliefs to secular critical thinking. On secular college campuses many graduates of these high schools, including those who learned in Israel, doubt or even deny the fundamentals of faith, exactly as the Rambam warned.
The Rambam (Sefer Hamitzvos ibid) continues: We may not be drawn after pleasures and physical lusts by our thoughts focusing on them constantly. Straying after one's eyes can lead to prohibited sexual activity. Here, too, the thought itself is prohibited, even if no physical violations result. Unfortunately, today's unprecedented availability of sexually arousing material makes this mitzva harder to fulfill. Moreover, the permissive culture we live in dramatically increases the chances that sins of thought, vision, and speech will lead to sins of the flesh (Rashi 15:39). Too often, high school students do not observe the laws prohibiting physical contact between boys and girls (See Shulchan Aruch, Even HoEzer siman 21. Also see Igros Moshe Even HoEzer vol. 4 siman 60). In secular college campuses many ostensibly Orthodox Jews succumb to the permissive, and even promiscuous, culture.
The percentage of graduates of Orthodox high schools who attended secular colleges that abandon the basic Torah practices of Shabbos and kashrus is alarmingly high. "Orthodox Assimilation on College Campuses" (a recent work by Drs. Perl and Weinstein) shines light on this terrible and increasing reality. The Rambam's proof text refers to a Jewish man marrying a non-Jewish woman, and intermarriages, sometimes with an insincere and likely invalid conversion, are on the rise in this population.
The Sefer Hachinuch (mitzvah 387) notes that one of the reasons the Torah does not prescribe lashes for one who transgresses the prohibition of "Do not explore..." is that it is impossible for one's sights and thoughts to never go beyond that which is acceptable and therefore there is no clearly defined and detectable boundary which we could use to measure this transgression [See Freedom of Inquiry in Torah Umada Journal Vol. 1,2,3]. Nonetheless, placing a youngster in a spiritually dangerous situation is religiously reckless ("What should that son do and not sin?" Berachos 32a.)
Am Yisrael knew that avoda zara was meaningless and they did it only to allow themselves prohibited sexual relationships publicly (Sanhedrin 63b). Their sexual desires overcame them and they said, let us remove the entire burden of Torah from ourselves, then no one will rebuke us about sexual matters (Rashi). Today as well, heresy, the modern-day version of idolatry, and even the abandonment of all Torah commandments, may be linked to sexual desires prohibited by halacha but permitted and even encouraged by today's decadent society's credo of "do whatever feels good."
Now, more than ever, we must guard our eyes and hearts with the necessary boundaries to distance ourselves from such behavior. Parents must model proper thought and conduct and do their utmost to protect their children as well. The Torah's prohibition and warning of, "Do not explore...", recited twice daily in Shema and reinforced constantly by the mitzva of tzitzis, must govern our decisions for ourselves and our children, "so that you may remember and perform all My commandments and be holy to your G-d" (15:40).