Śrīmad-Bhāgavatam · Text 4.6.45
Who is speaking and story frame
त्वं कर्मणां मङ्गल मङ्गलानां
कर्तु: स्वलोकं तनुषे स्व: परं वा ।
अमङ्गलानां च तमिस्रमुल्बणं
विपर्यय: केन तदेव कस्यचित् ॥ ४५ ॥
tvaṁ karmaṇāṁ maṅgala maṅgalānāṁ
kartuḥ sva-lokaṁ tanuṣe svaḥ paraṁ vā
amaṅgalānāṁ ca tamisram ulbaṇaṁ
viparyayaḥ kena tad eva kasyacit
O most auspicious lord, you have ordained the heavenly planets, the spiritual Vaikuṇṭha planets and the impersonal Brahman sphere as the respective destinations of the performers of auspicious activities. Similarly, for others, who are miscreants, you have destined different kinds of hells which are horrible and ghastly. Yet sometimes it is found that their destinations are just the opposite. It is very difficult to ascertain the cause of this.
Read Śrīla Prabhupāda's purport on Vedabase.io