He did, and He placed it onto Christ.
Why that way? I don't know, but what I do know is that sin is often worse than we think it is and its impact is real. If justice is real then that means punishment for evil also has to be real.
A loving God will take on the punishment of a sin for you.
A just God cannot let someone get away with sin.
God is both loving and just.