Our Gemara on Amud Aleph states:

רָבִינָא אָמַר בִּדְעוּלָּא פְּלִיגִי דְּאָמַר עוּלָּא דְּבַר תּוֹרָה בַּעַל חוֹב בְּזִיבּוּרִית שֶׁנֶּאֱמַר בַּחוּץ תַּעֲמוֹד וְהָאִישׁ אֲשֶׁר אַתָּה נֹשֶׁה בוֹ יוֹצִא אֵלֶיךָ אֶת הַעֲבוֹט הַחוּצָה מָה דַּרְכּוֹ שֶׁל אָדָם לְהוֹצִא לַחוּץ פָּחוּת שֶׁבַּכֵּלִים וּמָה טַעַם אָמְרוּ בַּעַל חוֹב בְּבֵינוֹנִית כְּדֵי שֶׁלֹּא תִּנְעוֹל דֶּלֶת בִּפְנֵי לֹוִין.

Ravina said: Another resolution to the contradiction between the baraitot is that the baraitot disagree with regard to the opinion of Ulla, as Ulla says: By Torah law, a creditor collects from inferior-quality land, as it is stated: “You shall stand outside, and the man you have a claim against will bring his collateral out to you” (Deuteronomy 24:11). One can infer: What item would a person typically choose to bring out for use as collateral and potential payment? Certainly it is the most inferior of his utensils. The verse thereby indicates that a creditor collects from inferior-quality land. But if so, for what reason did the Sages say that a creditor collects from intermediate-quality land? They instituted this ordinance so as not to lock the door in the face of potential borrowers, as, if creditors were limited to collecting from inferior-quality land, they would be hesitant to offer loans in the first place.

Sefer Daf Al Daf quotes the following question from the Kehillas Yitschok (Ki Tetze, Yekara Deoraysa):

The Gemara Kiddushin (39b) paradoxically states:

כֹּל שֶׁזְּכִיּוֹתָיו מְרוּבִּין מֵעֲוֹנוֹתָיו – מְרִיעִין לוֹ, וְדוֹמֶה כְּמִי שֶׁשָּׂרַף כׇּל הַתּוֹרָה כּוּלָּהּ וְלֹא שִׁיֵּיר מִמֶּנָּה אֲפִילּו אוֹת אַחַת. וְכֹל שֶׁעֲוֹנוֹתָיו מְרוּבִּין מִזְּכִיּוֹתָיו – מְטִיבִין לוֹ, וְדוֹמֶה כְּמִי שֶׁקִּיֵּים כׇּל הַתּוֹרָה כּוּלָּהּ וְלֹא חִיסֵּר אוֹת אַחַת מִמֶּנָּה!

Anyone whose merits are greater than his sins is punished with suffering like one who burned the entire Torah without leaving even one letter remaining of it. Conversely, anyone whose sins are greater than his merits has goodness bestowed upon him in this world, and he appears like one who has fulfilled the entire Torah without lacking the fulfillment of even one letter of it.

Why the opposite reaction? Why does the sinner get such good treatment and the person who is mostly good suffers such harsh penalties? Rashi explains:

Anyone whose merits are greater than his sins is punished with suffering in order to cleanse his sins in this world and enable him to merit full reward for his mitzvot in the World-to-Come. And due to this, his punishment appears to observers like one who burned the entire Torah without leaving even one letter remaining of it. Conversely, anyone whose sins are greater than his merits has goodness bestowed upon him in this world in order to “use up all his reward in this world.

Kehillas Yitschok asks, isn’t such behavior seemingly petty and vengeful? It is one thing for God to enable the good person to cleanse his sins in this world via suffering, but why “deprive” the sinner of the same “opportunity”? The answer is that when one sins, he becomes indebted to God and owes Him payment. We have learned in our Gemara that the original Biblical law only requires the debtor to pay from his least quality fields. Thus, to the righteous person, his “real estate” in the World to Come is literally his REAL estate. Since this is his most desired property, God collects payment from him in the material world, since this is his lower quality asset base. However, for the person who is not righteous, he values the material world and possessions as his high-quality asset, and devalues the spiritual rewards in the world to come. Therefore, God extracts payment from, what is subjectively to him, inferior quality real estate.

While this is a clever derash, it still has to make sense and be fair metaphysically. I believe that this is metaphorically expressing the idea that to some extent, we create the kind of relationship we want with God and the world. God respects human autonomy and self-determination so strongly that the way in which one desires to orient oneself manifest the terms of his punishment or success accordingly.