For even the Son of Man did not come to be served, but to serve, and to give His life a ransom for many.
Usually, this is wedded to penal substitutionary atonement, and so Jesus' death is seen to be a payment to ransom us from punishment. This view needs a bit of nuancing. Context will help as well will see shortly.
The word ransom is lutron, and is used in the context of slavery and ransoming or freeing a slave from the market. The most obvious source of the slavery here is to sin, but I wonder in a sense (and context might make a case) that the devil is also part of it - given the theme early of binding the strongman and robbing his house. There are echoes of this in John's gospel when Jesus says that the ruler of this world is going to be thrown down when he ascends to the cross.
We need to be careful with demonology, but the idea behind human evil, particularly that of evil structures and systems finds a good deal of resonance in the gospels. There are plenty of models of the atonement; we don't need to flatten them into one.
In the Exodus, chapter 8 and verse 23 we read:
I will put a division between My people and your people. Tomorrow this sign will occur.
However, the Hebrew has "set a ransom" instead of "put a division". The Israelites were rescued from Egypt, it's slavery, empire and gods.
Now it makes more sense of Jesus' critique of the disciple's question of who is the greatest, and his critique of the way in which Gentiles (read Rome) rule over people.
Jesus ransoms us from every evil empire, evil structure, with sin and the devil at its heart so that we can live a new life of freedom. That new life includes a new way of being in society at all levels, a new approach to leadership. Atonement is communal and political.