Essentially, the crux of occult practice is to gain control over the astral plane, without falling prey to its abundant glamours & illusions while attempting to explore or traverse it. Traversing through the Astral plane is ruled by the 12th house, and Pisces in the Natural Zodiac. The 12th house relates to sexual energy loss of any kind through bed pleasures, loss in dreams, masturbation etc., but also to the realm one is absorbed into when they die. The dangers of the astral plane are always sexual in nature & this is because when we dream or go onto the astral plane consciously, we are entering into the creative passionate plane, ruled by the Raja Guna/mode of activity. It goes without saying that going onto the plane of sexual passion, where all of one's most carnal desires appear as quickly as one can imagine them, is dangerous for the person who lacks self-control. Any individual attempting to explore the astral world is stuck and often literally enchanted by the sights and experiences that manifest before them, because the plane conforms to the desires and weaknesses of the spiritual aspirant.
This is why in Jyotish, the Moon rules over the persuasion method of "temptation", and because the astral plane is ruled by the Moon, it naturally uses this method to both teach its lessons, but also harm individuals who are too impure to deal with the pleasures and possibilities of this reality. In this way, it can be said that the primary guardian and "defense mechanism" of the Moon, to weed out the impure from profaning its most secret mysteries, revolves around seduction and sexual pleasure.
If you consider that Venus, the planet that rules over indulging to the senses, is exalted in Pisces, the ruler of the 12th house, it becomes much more clear that although sensual indulgence is dangerous for the individual who cannot control themselves, it is the primary mechanism for liberation for those who cultivate true purity. The Moon rules over the sensory organs and mind, and because of this, is very concerned with purity because if the person does not have a pure mind, they cannot use their sensory organs for pleasure safely & so they cannot activate unity with god and activate their 12th house through using the astral plane, and the proper techniques to avoid the sexual dangers of this plane. Just as a person seeks to be absorbed into God-- and the mystic understands this to be the desire of their spiritual exercises & the Crown of the individuation process— the Adept also understands the dangers that are at stake if they cannot control their sexual energy. The true danger of the astral is similar to the way that a pitcher plant lures insects into its mouth that contains an alluring, sweet, sticky, liquid with sedating properties, which ensnares the victim and causes it to be slowly digested by the plant. This is how one can be soothed & immersed into their own delusions or impurities on this intangible plane-- or even fall into the grasp of a more powerful adept or individual who coaxes them into an illusion of their making, and absorbs them, keeping the victim from the potential of individuating.
The 12th house rules prisons and mental hospitals, and it is quite common for criminals to confess that there is a supernatural motive behind their crime, or that they were encouraged or commanded to do an abominable deed from a disembodied voice or intelligence. Individuals who "lose their mind" and disconnect from objective reality and fall victim to their own fantasies and delusion, despite the many attempts to bring them back to correct sensory perception, fall under the negative side of the 12th house. The 12th house also relates to why spiritual practice is done in isolated locations alone, or with only your sexual partner present, and why the 12th house rules liberation and also locations such as monasteries or places where the astral plane overlaps more strongly into the physical, such as locations where spiritual individuals have done practice in the past or where elevated spirits dwell. A person must perform spiritual practice to protect themselves and ensure they do not fall under a misleading spiritual intelligence, which is all too willing to enslave them and erode their willpower and sense of spiritual direction.