The early Church fathers had struggled with the topic of atonement and how it worked theologically. Since Adam, no human being could go to Heaven; they were all trapped in Hell with the Devil/Satan/Lucifer (and those were three different entities who were conflated over time, but I'm not going to get into that).
One idea was the "ransom theory of atonement." Augustine of Hippo explained it thusly:
The Redeemer came and the deceiver was overcome. What did our Redeemer do to our Captor? In payment for us He set the trap, His Cross, with His blood for bait. He [Satan] could indeed shed that blood; but he deserved not to drink it. By shedding the blood of One who was not his debtor, he was forced to release his debtors
The idea was that Satan could hold God's creations as captives and they needed ransoming, suggesting that Satan therefore had "rights" of ownership that had to be satisfied. This understandably bothered some people. Why didn't God just overpower Satan and take His people?
Irenaeus in the 1st century talked about the "recapitulation theory of atonement." In it, Jesus was a second Adam, succeeding where Adam had fallen. So Christ's life is like a "do over" of some kind, and humanity is re-set back to the ability to achieve salvation through free will, not stuck because of Adam's failure. Why didn't God just forgive the original sin, if he was going to forgive it after Christ went through those motions?
There is also the "penal substitution theory." This is a much later development, and promoted by Martin Luther during the Reformation. The penal substitution theory of atonement says that Christ, having voluntarily given himself up as a sacrifice, "took the hit" in place of sinners. This treated Christ as a "whipping boy," which was a profession historically in which a boy would be raised alongside a prince and made to suffer corporal punishment when the prince was a bad boy, because it wasn't appropriate to beat a prince. (It was hoped that the prince, seeing the harsh punishment meted out, would feel bad and reform his ways.) "He died for your sins" is oft quoted in this context, especially by Protestant groups.
Anselm was not comfortable that the ideas of "ransom" or "recapitulation" were proper solutions, and so decided he needed to offer his own explanation. He was influenced by his time, specifically (as Irenaeus and Augustine would not have been) by the by-then-well-developed feudal system. Anselm's solution is called the "satisfaction theory of atonement." I'll explain it tomorrow.