Wherefore the law was our schoolmaster [to bring us] unto Christ, that we might be justified by faith.
Note 10 at Ga 3:24: Here, the Law was declared to be our "schoolmaster," bringing us to Christ so that we might be justified by faith in Him.
The Greek word for "schoolmaster" is "PAIDAGOGOS," and it describes a slave in either Greek or Roman households whose job was to conduct a young child to and from school (to the real teacher), as well as to supervise the life and morals of the child until he or she reached maturity. Although the PAIDAGOGOS may have instructed, their real job was to supervise by strict enforcement of rules and regulations. So, until Christ came, the Law was like someone trying to make us behave.
The Law drove us to holiness to show the futility of self-salvation. This prepared us for the message of Christ bringing salvation as a gift. Only those who have known the oppression of the Law fully appreciate the redemption provided by Jesus as a gift.