I'm not exactly the most knowledgeable about Christianity, however if im not mistaken, the entire story about Moses is dedicated to the freedom of Jewish slaves. General school studies teach that much of the western world was religious to a fault.
How did Judeo-Christian countries and their rulers rationalize the affiliation with slavery, if the basis of their religion denounced it?
The bible permits slavery. It's true that there's a story about the liberation of Jewish slaves, but it still permits the Jews to enslave other people. And Christianity is a product of that tradition meeting with the Greco-Roman tradition, which also has slaves. The New Testament says nice things about slaves as people in a few places, but it definitely doesn't say that Christians can't own them. So, by and large, Christians did not experience slaveholding as contrary to their religion.