Galatians 3 says the law was a schoolmaster to bring us unto Christ. In what way did the rules and prohibitions of the Judaic law facilitate mankind's acknowledgement and acceptance of Jesus?
Some have said that the law was given by God as the pathway to achieved righteousness, but that achievement required perfect, life long obedience. Even one infraction made righteousness through the law impossible. Thus the Jews specifically and mankind in general, by extension, were introduced to the frustration of righteousness by obedience. They therefore became eager to see another way to be acceptable to God, and Jesus then came to be that new way. The experience of frustration and repeated failure under the law supposedly made man more amenable to what Jesus taught and represented.
I suspect that the above is partially correct but misses an essential point. In accordance with Paul in Romans 7, the law made sin more sinful. Again, many take this to mean that the prohibitions of the law added to the list of misdeeds to which man was subject and therefore multiplied the occasion of sin. If the law represented God's requirements and its violation was sinful in God's eyes, this makes sense.
However, in light of what Jesus taught about judgment in the Sermon on the Mount, the law actually promoted sin in its requirement that humans judge one another. In several places the OT commands law keepers to identify and punish law breakers. Later, Jesus comes and condemns the act of human judgment. That implies that the use of the law to judge and condemn others was itself a sin, since Jesus forbade it. When Jesus condemns judgment, it suggests that the law could only be used as a personal guide to right conduct individually. It could not be used as a weapon against others. Thus the law was potentially good and bad at the same time.