Coffman commentaries:
The quotation is from Deut. 21:23; and, since Christ was crucified on "the tree" the curse of the Law rested upon the Saviour and Redeemer of all mankind, and this in spite of the fact that Jesus our Lord was the unique and only person of all time who ever kept the totality of the Law in perfection.
It is written in 2 Cor. 5:21, that
"God made him who knew no sin to be sin on our behalf." Only by his crucifixion and suffering "without the camp" could the holy prophecies have been fulfilled by the Lord.