In short: the devil, not Christ, was the true scapegoat who assumed the burden of men's sins.
The devil was essential to the dualistic theology that Christianity copied from Persia. If the world was divided between the forces of good and evil, an evil deity was necessary, otherwise evil would have to be blamed on God. Logically, a god couldn't be both all-good and all-powerful. If God could make a world without evil, and would not, he couldn't be all-good. If God wanted to make a world without evil, and could not, he couldn't be all-powerful. The only solution—not a good one, but the only possible one—was to supply God with an evenly matched adversary, to be responsible for evil. Thus theologians thought it the worst heresy, "contrary to the true faith," to suggest that devils existed only in the ignorant imagination. The devil was so real to Martin Luther that he accosted him one evening and threw an inkpot at him.
Divine and devilish were relative terms, as the primary sense of Hebrew words for "good" and "evil" really meant "beneficial" and "hurtful." Gods did "evil" things if angered; devils could do "good" things if they were pleased. One man's god was his enemy's devil.
The words "devil" and "divinity" grew from the same root, Indo-European devi (Goddess) or deva (God), which became daeva (devil) in Persian. Old English divell (devil) can be traced to the Roman derivative divus, divi: gods. Thus it seems that, from the beginning, gods and devils were often confused with one another.