Wayne Grudem expresses my thoughts concisely on the issue in his Systematic Theology (must reading for all Christians).
If Christ had only earned forgiveness of sins for us, then we would not merit heaven. Our guilt would have been removed, but we would simply be in the position of Adam and Eve before they had done anything good or bad and before they had passed a time of probation successfully. To be established in righteousness forever and to have their fellowship with God made sure forever, Adam and Eve had to obey God perfectly over a period of time. Then God would have looked on their faithful obedience with pleasure and delight, and they would have lived with him in fellowship forever.
For this reason, Christ had to live a life of perfect obedience to God in order to earn righteousness for us. He had to obey the law for his whole life on our behalf so that the positive merits of his perfect obedience would be counted for us. Sometimes this is called Christ’s “active obedience,” while his suffering and dying for our sins is called his “passive obedience.” Paul says his goal is that he may be found in Christ, “not having a righteousness of [his] own based on law, but that which is through faith in Christ the righteousness from God that depends on faith” (Phil. 3:9). It is not just moral neutrality that Paul knows he needs from Christ (that is, a clean slate with sins forgiven), but a positive moral righteousness. And he knows that that cannot come from himself, but must come through faith in Christ. Similarly, Paul says that Christ has been made “our righteousness” (1 Cor. 1:30). And he quite explicitly says, “For as by one man’s disobedience many were made sinners, so by one man’s obedience many will be made righteous” (Rom. 5:19).
Some theologians have not taught that Christ needed to achieve a lifelong record of perfect obedience for us. They have simply emphasized that Christ had to die and thereby pay the penalty for our sins. But such a position does not adequately explain why Christ did more than just die for us; he also became our “righteousness” before God. Jesus said to John the Baptist, before he was baptized by him, “It is fitting for us to fulfil all righteousness” (Matt. 3:15).
It might be argued that Christ had to live a life of perfect righteousness for his own sake, not for ours, before he could be a sinless sacrifice for us. But Jesus had no need to live a life of perfect obedience for his own sake—he had shared love and fellowship with the Father for all eternity and was in his own character eternally worthy of the Father’s good pleasure and delight. He rather had to “fulfill all righteousness” for our sake; that is, for the sake of the people whom he was representing as their head. Unless he had done this for us, we would have no record of obedience by which we would merit God’s favor and merit eternal life with him. Moreover, if Jesus had needed only sinlessness and not also a life of perfect obedience, he could have died for us when he was a young child rather than when he was thirty-three years old.
By way of application, we ought to ask ourselves whose lifelong record of obedience we would rather rely on for our standing before God, Christ’s or our own? As we think about the life of Christ, we ought to ask ourselves, was it good enough to deserve God’s approval? And are we willing to rely on his record of obedience for our eternal destiny?
(Wayne Grudem: Systematic Theology, Inter-Varsity Press, Leicester, England and Zondervan Publishing House, Grand Rapids, Michigan, A Division of HarperCollins Publishers, pp.570-571)