(Exodus 21:5) "But if the servant plainly says." It tells that he is not pierced until he says twice, "I love my master." I have here only the case where he has a wife and children and his master has a wife and children. When his master does not have a wife and children, from where do I learn it? Scripture teaches, saying, "And it shall be, if he says to you," etc. (Deuteronomy 15:16). From here they said: he is never pierced unless he has a wife and children and his master has a wife and children. That he loves his master, and his master loves him, that his master's property was blessed through him - from where do we learn this is required? It says, "And it shall be, if he says to you, etc., for it is good for him with you" (Deuteronomy 15:16) - that his welfare should be equal to yours. From here they said: his master must not differ in his treatment of him - he feeds him and gives him drink and anoints him from his own; Scripture teaches, saying, "for it is good for him with you" (Deuteronomy 15:16).
The Servant Who Declares I Love My Master and Stays
Yalkut Shimoni on Torah 315:1
(שמות כא ה) וְאִם אָמֹר יֹאמַר הָעֶבֶד, מַגִּיד שֶׁאֵינוֹ נִרְצָע, עַד שֶׁיֹּאמַר שְׁתֵּי פְּעָמִים אָהַבְתִּי אֶת אֲדֹנִי. אֵין לִי אֶלָּא בִּזְמַן שֶׁיֵּשׁ לוֹ אִשָּׁה וּבָנִים וּלְרַבּוֹ אִשָּׁה וּבָנִים. בִּזְמַן שֶׁאֵין לְרַבּוֹ אִשָּׁה וּבָנִים, מִנָּיִן תַּלְמוּד לוֹמַר (דברים טו, טז) "וְהָיָה כִּי יֹאמַר אֵלֶיךָ" וְגוֹ'. מִכָּאן אָמְרוּ, לְעוֹלָם אֵינוֹ נִרְצָע, אֶלָּא אִם כֵּן יֵשׁ לוֹ אִשָּׁה וּבָנִים וּלְרַבּוֹ אִשָּׁה וּבָנִים. אוֹהֵב אֶת רַבּוֹ, וְרַבּוֹ אוֹהֲבוֹ שֶׁנִּתְבָּרְכוּ נְכָסָיו עַל יָדוֹ, מִנָּיִן לְכַךְ נֶאֱמַר (שם) "וְהָיָה כִּי יֹאמַר אֵלֶיךָ וְגוֹ' כִּי טוֹב לוֹ עִמָּךְ", שֶׁתְּהֵא טוֹבָתוֹ שָׁוָה לְךָ, מִכָּאן אָמְרוּ, לֹא יְשַׁנֶּה רַבּוֹ עָלָיו, מַאֲכִילוֹ וּמַשְׁקוֹ וּמְסִיכוֹ מִשֶּׁלּוֹ, תַּלְמוּד לוֹמַר (שם) "כִּי טוֹב לוֹ עִמָּךְ".