It is, apparently, a German story of the type
The Two Travelers: Truth and Falsehood
folktale of Aarne-Thompson-Uther type 613
Unsurprisingly, the tables are turned by the end of the tale.
"What?" said the tailor. "Haul bread for seven days on one's back like a beast of burden and not be able to look about? I shall trust in God, and not trouble myself about anything. The money I have in my pocket is as good in summer as in winter, but in hot weather bread dries out and gets moldy on top of that. Even my coat reaches only to my ankles. Why shouldn't we find the right way? Bread for two days, and that's enough."
Therefore each person bought his own bread, and then they tried their luck in the forest. It was as quiet there as in a church. No wind stirred, no brook murmured, no bird sang, and no sunbeam found its way through the thickly leaved branches. The shoemaker did not speak a word. The bread weighed so heavily on his back that the sweat streamed down his cross and gloomy face.
The tailor, however, was quite merry. Walking on with a spring in each step, he whistled on a leaf, or sang a song, and thought to himself, "God in heaven must be pleased that I am so happy."
This lasted two days, but on the third there was still no end to the forest, and the tailor had eaten up all his bread. Thus his heart sank down a yard deeper. Nevertheless, he did not lose courage, but relied on God and on his luck. On the evening of the third day he lay down hungry under a tree, and rose again the next morning still hungry. The fourth day was the same, and when the shoemaker seated himself on a fallen tree and devoured his dinner the tailor was only a spectator.
If he begged for a little piece of bread, the other laughed mockingly, and said, "You have always been so merry. Now you can see for once what it is like to be sad. Birds that sing too early in the morning are caught by the hawk in the evening."
In short, he was merciless. On the fifth morning the poor tailor could no longer stand up and was hardly able to utter one word for weakness. His cheeks were white, and his eyes were red.
Then the shoemaker said to him, "I will give you a bit of bread today, but in return for it, I will put out your right eye."