This question is a different aspect of the previous question "why-parshas-mishpatim-begin-with-laws-of-slaves".
A man that is discharged from a prison promises to never get back. A nation that was severely enslaved for hundreds of years, I assume, would want to erase the idea of slavery from its norms, namely a free Jew being a slave of another more powerful and resourceful Jew. I would also presume they would want to eradicate that idea for all nations, being "אור לגויים" - the enlightenment for all nations.
However, the first thing that G-d says to them is that they will continue that practice - selling and buying a needy and starving fellow into human slavery.
It does not sound right to me at all.
Why G-d did not promise the Jews to end slavery once and for all and why did the Jews not revolt against such laws?