Parshat בהר is a very short Parsha, but has numerous laws. Among them is the continuation of the laws of the Hebrew slave, עבד עברי.
The discussion of עבד עברי in פרשת משפטים refers to a Jewish thief. When he cannot pay for his theft, he is sold into slavery for six years.
Our Parsha speaks of the עבד עברי who is forced to sell himself into slavery because of his terrible poverty. To add insult to injury, he may find it difficult to even find a Jewish master.
In the event that he is bought by a non-Jewish master, known as a גר תושב, his family must do everything possible to buy him back.
The commentators do not believe such poverty happened by chance. The poverty was brought about by a lack of diligence in observing the Shmitta laws and in giving charity.
One must remember that he receives Divine protection when he is diligent in observing all Mitzvot.