The man who purchases a Jewish maidservant is supposed to marry her. If he doesn’t, he’s supposed to help her redeem herself from service before the end of her term of service. And if he doesn’t? Nothing. There’s no third option. He’s not permitted to sell her to a third party.
The Torah says that the servant girl’s master may not sell her “l’am nachri,” literally “to a foreign nation,” but it is accepted as meaning that the master may not re-sell her at all. Not only that, once she goes back to her father, even he may not sell her a second time. One sale per minor girl - that’s the limit! (See Talmud Kiddushin 18a.)
The reason is the expression of compassion discussed in the past few mitzvos.
Like the other mitzvos in this section, this prohibition only applies to men and only at a time when the Jubilee year is observed. It is found in Talmud Kiddushin 18 and in Mishneh Torah Hilchos Avadim chapter 4. It is #261 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos.