Why was Jesus stripped of his garments? Was it not that he might prepare garments of righteousness for us in our spiritual nakedness?

One night of bitter cold and pitiless storm a mother was out in the wilds with her child in her arms. Unable to carry her precious burden and find a shelter, she took off her own outer clothing, and wrapping it about her little one she laid him in a cleft of the rock, and hastened on, hoping to find help. Next morning some shepherds heard the cry of a child, and found the babe safe and warm in the rock’s cleft. Then, not far away in the snow, they discovered the mother – dead! She had stripped off her own garments and died in the cold to save her child. Did not Jesus do the same? He took off his raiment and hung naked on his cross, that we may stand in the final judgment arrayed in robes of beauty.
(J. R. Miller)