God had many purposes for giving the Mosaic Law, but providing the means of becoming justified through our own effort was never one of them. Among other purposes, Jesus said that justice, mercy, and faith are the weightier matters of the Law (
Matthew 23:23), so a purpose for obeying the Law is learn about how to have justice, mercy, and faith. God said that what He commanded was for our own good (
Deuteronomy 6:24,
Deuteronomy 10:13), so obeying the Law is about growing in faith in God about how to rightly live. Jesus summarized the Law as being instructions for how to love God and our neighbor (
Matthew 22:36-40) and said that if we love him, then we will obey his commands (
John 14:15), so obedience to God is about growing in a relationship with Him based on faith and love. Jesus denied knowing people who were workers of Lawlessness (
Matthew 7:23), we are told that no one who keeps on practicing Lawlessness has neither seen nor known him (
1 John 3:6), and we are told that a relationship with Jesus is the goal of the Law for righteousness for everyone who believes (
Romans 10:4), so obedience to the Law is again about growing in a relationship with Jesus. Paul said that the Law is holy, righteous, and good (
Romans 7:12), so it is about being trained by in grace how to act according to God's holiness, righteousness, and goodness (
1 Peter 1:13-16,
1 John 3:4-10,
Ephesians 2:10,
Titus 2:11-14) and about reflecting those attributes to world (
Isaiah 2:2-3,
Isaiah 49:6). Paul said that the Law was given to make us conscious of sin (
Romans 3:20) and that he wouldn't even know what sin was if it weren't for the Law (
Romans 7:7), so a purpose of the Law is to teach us how to avoid sin, which is also something that we are told to do in the NT (
Romans 6:15). Jesus was sinless, which means that he set a perfect example of how to walk in obedience to the Law, so obeying the Law is about following his example (
1 Peter 2:21-22), about follow his commands and walking in the same way that he walked (
1 John 2:3-6), about being his disciple (
Matthew 28:16-20), about becoming obedient bondservants to the God that we serve (
Romans 6:16,
1 Corinthians 7:22), about being set free from sin to become slaves of righteousness (
Romans 6:17-18), and about no longer presenting our members as slaves of impurity and Lawlessness, but presenting our members as slaves of righteousness leading to sanctification (
Romans 6:19). Obedience to the Law is about refraining from following Israel's example of disobedience (
1 Corinthians 10:1-13), about working out our salvation (
Philippians 2:12), about walking in freedom (
Psalms 119:45,
James 1:25), about delighting in God (
Psalms 1:1-2,
Romans 7:22), about being blessed (
Deuteronomy 30:15-20,
Psalms 119:1), about entering into life that is life (
Matthew 19:17), about following the good way where we will find rest for our souls (
Jeremiah 6:16-19,
Matthew 11:28-30), about being redeemed from Lawlessness (
Titus 2:14), about bringing reproof, correction, training in righteousness, and equipping us to do every good work (
2 Timothy 3:16-17), and about what we are to do because we have been justified (
Ephesians 2:8-10), but it has never been about what we need to do in order to become justified.