Great question in my opinion. I would start by looking at Romans 8:2, Romans 4:3, Galatians 3:6 and Proverbs 24:16.
Jesus is justified because He is God's Son. He is loved because of who He is. God also wants to "include" us in Christ as Paul talks about in Ephesians 1:13.
Romans 8:2 tells us that we are free from condemnation because we are set free in the inner man. This tells me that we are justified because we are born again. We are not born again because we are justified. We are justified, because, like Jesus we are sons and daughters, having been born again by the Holy Spirit.
We are able to be born again because the blood of Jesus made that possible for us while we were still sinners.
If we are in Christ, we are justified because we are in Christ's inner circle or His family, per se. How do we get into His family? If we trust God as Abraham did, then we are in the inner circle even if we are imperfect. This righteousness that is not perfect, but that trusts God can be seen in Proverbs 24:16. Galatians 3:6 and Romans 4:3 talk about Abraham trusting God and thus being justified.
Jesus trusted the Father. His trust in God is different than ours though because He didn't carry the same corrupted nature that we had before being in Christ and so His trust in the Father led to total sinlessness during His life on Earth.
A lot of the problems here are that the translators of the New Testament translate the verb and noun of the same root differently. The noun is translated as "faith" and the verb is translated as "believe". The exact same word conjure 2 quite different ideas in the English language here. Hebrews 11 shows us that they both basically mean "trust" - confidence of what we do not see.
We are saved by grace through trust, would be an appropriate translation of Paul's statement. It makes it far less mystical sounding and actually is what it is.
"but the people of Israel, who pursued the law as the way of righteousness, have not attained their goal. Why not? Because they pursued it not by faith but as if it were by works." - Romans 9:31-32a
Romans 9:31-32 is crucial. It shows us that the law is not the opposite of faith. You can practice the law by faith or practice the law by works. Practicing the law by faith is good and Biblical, but it shows that the practicing of the law must be the fruit of faith and that faith is how you are justified. And this makes sense logically too.
I don't refrain from murdering so that I will be justified before God. I refrain from murdering because I'm not psychologically damaged, and thus I love the people in my life. You can't be justified by following the law. You are justified by trusting Jesus, and then you learn from Jesus about how to act righteously as you trust Him.
Practicing the law by works: my interpretation is that some Jews didn't trust God at all and were practicing the law to try and tie God's hands as far as allowing them into the Kingdom. It just doesn't and will never work that way. Grace is uncoerced favor. God is the decider of who is let in, and the one condition for Him letting someone in is trusting Him.
Justification is through trust in God. Works of the law are the fruit of that trust. For us sinless perfection will only come after a lifetime + more of practicing and being retrained by the Father Himself in the next life. For Jesus He was able to live in sinless perfection in this life because He didn't have a corrupted nature.
Jesus was legitimately able to die on our behalf because He was the pure spotless lamb, but that language of being pure and spotless is about freedom from corruption. The law teaches how to avoid corruption, it doesn't gain us any kind of standing with God. It's like sin is a cliff. Not jumping off the cliff isn't an accomplishment, but it prevents you from being destroyed. Jesus didn't get destroyed. That's good, but it was His powerful uncorrupted nature that made Him able to die on our behalf, not anything He accomplished by following the law.
Basically, following the law isn't an accomplishment that caused Jesus to be able to coerce God into saving us. Coercion just isn't part of the equation. Following the law kept Jesus free from corruption so He would have organic power to set us free.
Basically Jesus kept the law because it was the righteous thing to do and righteousness is in His nature. Keeping the law didn't gain Him anything before God, but failing to keep the law would have lost Him the ability to intercede on our behalf. There is a middle place where WHO HE IS causes Him to be able to intercede just as WHO HE IS made Him able to live righteously. He is that He is. He is the pure and spotless lamb.