Yosef Mokir Shabbos (Gemorah Shabbos, 119a)
There was a man named Yosef who was well known in the manner in which he honored Shabbos. In Yosef’s neighborhood there lived a wealthy gentile. One day astrologers told the gentile, “all your wealth is destined to become that of Yosef Mokir Shabbos.” In order to thwart their prediction, te gentile went out and sold his entire estate. With the sale money he purchased a single pearl, which was then placed in a gold setting on a hat which he wore.
One day as the gentile was crossing a bridge, a gust of wind blew his hat off his head. The hat fell into the water below and was swallowed by a large fish. The fish was caught and brought into the market friday afternoon. The fishermen asked “Who will buy such a large fish, at this late hous?” Bring it to Yosef Mokir Shabbos they were told, “for he is in the habit of making such purchaes.” They brought the fish to Yosef, and he bought it. When he cut open the fish, he found the pearl. Yosef sold the pearly for the huge fortune that it was worth. At that time, an elder met Yosef and remarked “One who borrows for Shabbos (i.e goes to great expense for Shabbos’ sake), Shabbos pays back.”
Eiyun Yaakov explains that Yosef Mokir Shabbos was accostomed to spending far above his means to honor Shabbos, and this made him the object of the gentile’s ridicule. It was therefore decreed in heaven that the gentile would be punished by losing his entire fortune and that Yosef would be rewared by acquiring the gentile’s wealth.
As Anaf Yosef notes, the was throgh which the gentile hoped to retain his wealth was precisely the way through which it became Yosef’s. By investing his entire ffortune in a single pearl, the gentile made his transfer of wealth as simple as can be.
This illustrates that Hashem has infinite means through which to bring about a desired end. Those who see Shabbos as a financial scrifice would do well to bear this lesson in mind.