In Kabbalistic thinking, God is dual, both male and female, each one inable to exist without the other. Sadly, macho rabbis obliterated such ideas from the Old Testament over the years....if you haven't read "The Book of J", I would suggest it. David Rosenberg is the translator of this very early text, and Harold Bloom was the editor. Among Harold's other claims to fame were writing a lot, and sleeping with my university Gothic Lit teacher while she was a grad student under him at Yale (I believe). Now that story was FAR more interesting than his writing....
Christian mystics, such as the alchemists and the Rosicrucians also had a similar concept of God, and like the Kabbalists, believed sex to be the joining of the the two halves of God, and therefore sacred. They were banned too. Go figure.