Only male hebrews had the possibility of release after 6 years. But if their master tricked them into taking a wife, then the only way for the slave to stay with his wife and children would be to pierce his ear and become his master's property forever. The wife and children would stay with the master too of course.
On the other hand, hebrew fathers could sell their daughters into slavery forever. Humans as property.
And non-hebrews who were forced into slavery were the same way. They become the property of their masters forever, to be passed down. They could be bought from foreigners, kidnapped, taken as slaves after war, etc.
These are the laws of Moses that Jesus said should be followed. I have better morality than that Jesus.