It is a beautiful, difficult and paradoxical expression. What can it mean that through Father's dispensation Jesus, who knew not sin, was made "sin" for us? He committed no sin, and then what does it mean "he was made sin"? There can be many interpretations, one more profound and beautiful than other, I offer my one:
"sin" (ἁμαρτία) is translated as "missing", and as such it is a deficiency and privation of the fulness of divine perfection, so the one who "knows no sin" is the one who is only perfect, with no slightest taint of deficiency; therefore, not an angel (for even in the highest of them God finds "faults", that is to say, creaturely deficiencies, as written in Job 4:18, for they are not uncreated and properly divine), not a saint, but only God. Thus, the expression "knew not sin" means, as Paul often writes, that Jesus is equal to the Father in perfection (cf. Phil. 2:6), sharing the entire fulness of Godhead with the Father (Col. 2:9), and appealed by Paul most often by the divine name "Lord", to whom worship befits no less than to the Father.
But how He became "sin"? He, the uncreated Logos, the only-begotten Son, in the incarnation, adopted human created nature. Now, this nature was not damaged by the sinful inclinations, that has become a lot of all mankind since the fall of Adam, but in this adopted human nature, and He also humanly realised and perceived the human lot, the human maladies and afflictions, the power of sin that dragged humans and made them miserable; He suffered Himself thirst and hunger, physical pains, and psychic pains because of hard-neckedness of people around Him, the treason and abandonment even from His closest friends, so He perceived all gravest human sins, without sinning Himself. But whenever He met the infection of sin in people, He "took it on Himself", that is to say, healed them from it, taking this sin upon Himself figuratively, that is to say, consuming it in the fire of His divine love and divine forgiveness. Angel cannot forgive, only God can, and when Jesus authoritatively, divinely says "I forgive you", this means in fact, that He penetrates the depths of our essences as God and heals the infection of sin in us, figuratively speaking "taking this sin upon Himself".
This is, in my view, a tentative explanation of this paradoxical expression - "He became sin for us", that is to say, He gave heed to all entirety human sins so as to destroy this entirety within each of us in and through Himself, by taking those sins upon His sinless self, without tarnishing Himself, but rather drawing those sins to sinlessness through the "consuming fire" (Hebrews 12:29) of His divinity. Thus, paradoxically Christ became "sin" for sins, for if sins would "sin", that is to say, if sins would not behave in their proper sinful way, but rather in a non-sinful way (for this will be the sinning for sins), then they are destroyed as sins! For example, if a former alcohol addict will, through Christ, transform his addiction and inclination to alcoholism to an inclination of helping others getting out of this dangerous addiction, then his addiction has committed a Christly "sin" having being destroyed as a sin and having started to live a transformed life of righteousness. And thus, we become "righteousness in Christ" through work of His transfigurative grace in our hearts, for He, having become a Trap of sins, the "Sin" for our sins, transforms them from evil to good, thus destroying their tyranny upon and within us.
As to why Father's righteousness is also Jesus righteousness, I guess it is clear from what was said above: Father not only does not do the work of salvation in us without Jesus, but ontologically cannot do it, no less than Jesus Himself cannot do anything without the Father, and their salvational activity is one activity (cf. John 5:17). Can the sun's utility for all plants of the planet earth be separated from the utility of its rays? For in fact, sun's utility is expressed necessarily in its rays. Similarly and utterly similarly is with the Father and the Son, for both have shared one eternal glory even before creation of world (John 17:5), and exactly to this common glory and to this common righteousness the Father and the Son lead humanity, making us the living temples of Them (cf. John 14:23) and Their Holy Spirit (1 Cor. 6:19).