If a person steals and has no money to pay back, he becomes a slave. The maximum sentence is six years but at the end of six years he wants to stay longer then he gets his ear pierced and he stays until yovel.
Rashi quotes the medrash that the reason why the ear gets pierced is because “The ear that heard at Har Sinai ‘Do Not Steal’ went out stole”.

The mefarshim ask, this person stole six years ago, that’s when his ear should get pierced, why now that he wants to stay with his master longer do we pierce the ear? Secondly the medrash that brought ‘Don’t Steal’ was referring to kidnapping not stealing money. So what is the connection to this eved who stole money and the Aseres HaDibros that was referring to kidnapping?

Rav Shimon Schwab explains as follows. When you kidnap someone who are you kidnapping them from? Not their parents, siblings, children or any other family members. None of the aforementioned actually owns the person. HaShem is the only Owner and Master of a person. So now when this eved says “I love my master I want this new master to be mine” he is essentially kidnapping himself from Hakodosh Baruch Hu and making a different master for himself. So the reference to the Aseres HaDibros is applicable. And that is why we pierce his ear now. Because it is now that he is ‘kidnapping’ himself away from HaShem. We should continue to be avadim to the One true Master.