Shemot / Exodus 21:2 · Pshat
כִּי תִקְנֶה עֶבֶד עִבְרִי שֵׁשׁ שָׁנִים יַעֲבֹד וּבַשְּׁבִעִת יֵצֵא לַחָפְשִׁי חִנָּם׃
If you buy a Hebrew servant, six years he shall serve, and in the seventh he shall go out free, for nothing.
Pshat פְּשָׁט
Sold by the court
The Torah opens its laws with a slave. Who is this man, and how did he become a slave? Two commentators answer by the plain sense of the words.
Rashi and Rashbam: this speaks of a thief who has nothing to repay what he stole, and the court sold him to work off the debt. Such a servant serves six years and goes out free. Of one who sold himself out of poverty the Torah speaks elsewhere, in the book of Vayikra.
How Rashi and Rashbam explain it
Rashi If you buy
From the court, which sold him for his theft, as it says: "If he has nothing, he shall be sold for his theft" (Shemot / Exodus 22:2). Or perhaps this speaks only of one who sells himself because of his poverty? And one whom the court sold does not go out after six years?
When it says: "And if your brother grows poor with you and is sold to you" (Vayikra / Leviticus 25:39), one who sells himself because of poverty is already spoken of there. How then is "if you buy" fulfilled? It speaks of one whom the court sold.
Rashbam If you buy a Hebrew servant
Scripture speaks of one whom the court sold, as it is written: "If he has nothing, he shall be sold for his theft". Of one who sells himself out of poverty it is written in the section "On Mount Sinai": "If your brother grows poor and is sold to you". And of him it is written: "he shall serve with you until the year of the yovel" (Vayikra / Leviticus 25:40). And here it says "six years he shall serve": this is one whom the court sold.
There are among our teachers those who derive one law for both through a comparison of identical words (גְּזֵרָה שָׁוָה): if the yovel comes before six years, he goes out in the yovel. And there are those who tell them apart.
Takeaway
Rashi and his grandson Rashbam rest on a verse of the next chapter: a thief who has nothing to pay "shall be sold for his theft" (Shemot / Exodus 22:2).
The yovel (יוֹבֵל) is the fiftieth year, when in the Land of Israel servants go free and sold fields return to their owners (Vayikra / Leviticus 25:10).
"The section On Mount Sinai" is Rashbam's name for the section Behar (Vayikra / Leviticus 25), which opens with the words "on Mount Sinai".
A "comparison of identical words" (גְּזֵרָה שָׁוָה) is a way of interpretation: the law of one place is carried over to another where the same words stand.
Rashbam's text reads "יוכל", by sense "יובל", the yovel. The translation follows the sense.