Today many preach legalism as something negative and shy away from teaching the law.
The Bible in Galatians 3 tells us the law was our schoolmaster. You aren’t finished with school until you graduate. Likewise we are not done with the law until we let God write it in our minds and on our hearts.
In Matthew 5:17 KJV Jesus, my Lord, Savior, and teacher, said, Think not that I am come to destroy the law, or the prophets: I am not come to destroy, but to fulfil.
Lessons we learn from our teachers (schoolmasters) guide us throughout our lives.