A clue is provided to us in Lev 25:55 which states "for the Israelites belong to me as servants. They are my servants, whom I brought out of Egypt. I am the Lord your God."
An understanding of the historical customs surrounding conversion may also be helpful. Lawrence J. Epstein writes
God was conceived in very early Jewish thought as a national deity,
protecting the Israelites in their land, aiding them in their fights,
freeing them from hunger, and generally providing for the nation's
sustenance. ... God was seen as the exclusive Lord of the
Israelites; they could worship no other deity and God would protect no
other people.
As such, only by being Hebrew could you enjoy the benefits brought by following Yahewh. This did not exclude the foreigner however. Again, Epstein writes:
While there were no 'conversions,' many non-Israelites joined the
Israelite community, often through marriage or acceptance of the
beliefs and practices of the community. In this sense, assimilation is
the earliest form of conversion. Abraham and his descendants absorbed
many pagans and servants into their group, greatly increasing the size
of the Israelite people. ... Some ...wished to join the Israelites.
Such people were given a new status, as gerim (Hebrew for
"strangers"). A ger would be taken to the holy mountain and there
render the necessary sacrifices.
Gerim often assimilated into the Israelite people by intermarriage.
For instance, pagan women who married Jewish men automatically adopted
their clan, and thus their religious views. The marriages that
resulted were seen as positive because pagans would turn from idolatry
to God through such marriages.
The gerim were permanent residents, but did not own land. All
non-Israelites who joined a family or tribe were to be given equal
rights and equal responsibilities, although the participation in
religious rituals developed in stages. The Israelites were enjoined to
love the gerim, for the Israelites had been gerim in Egypt.
Presumably then, after adopting Israelight nationality and religeon, a foreigner was no longer different than their new Israelite bretheren and were entitled to the same rights to not be a slave.
This then is no different than Salvation - it is a right available to everyone, but only through fully adopting Yahweh as your God.