The Judaism that we know, and have known for the last 2000 years, is one particular form of that religion, the one that outlasted all the others. It is not the Judaism of the priesthood but the Judaism of the Rabbis. In the competition between the priests and the Pharisees, the Pharisees won.
Although its roots go back before the destruction of the Temple --and its mythology sends it back to Moses, of course-- the rabbis' transformation of the Mosaic religion of the preceding 1000 years was both massive and brilliant. It moved the Jews from being the people of the Temple and the Land to being the people of the Books. Plural. The Torah, the Prophets, the Writings...and the post-scriptural but crucial Talmud, the multivolumed record of rabbis arguing.
From the tracts of the Talmud
One of the slogans of the early rabbis --in the 200's or so AD-- was this:
Build a fence around the Torah. This meant that a whole field of oral law was created, law not written in the Five Books of Moses. Its role was partly to prevent Jews from even getting close to transgressing any of the original written commandments.
For instance, the Torah forbids cooking a kid-goat in its mother's milk; the oral law, the fence,
forbade eating any kind of meat with milk at all so the eventually two separate sets of dishes and utensils were created.. Also, since writing was considered work that broke the Sabbath, it was forbidden on that day even to touch a pen. And so it goes. As you move farther from the center, so to speak, the rules and behaviors can look strange and unconnected, but there is a logic to it all.
Although the Catholic Church has not consciously adopted this slogan, of course --one more adapted to a religion of holy law like Judaism (or Islam, with its Sharia) than a doctrinal/sacramental one-- I wonder if the same impulse has contributed to the creation of the Catholic sexual ethic (which, once upon a time, would not have been seen as unusual as it is now). On a conscious level, it is a combination of scriptural teaching, Old and New Testaments, and a commitment to the natural law. (I wouldn't be surprised if centuries of monastic introspection had some influence as well.)