By placing King Pariksit in an awkward position, the incarnation of Srimad-Bhagavatam was created by the will of the Lord. Being distressed by hunger and thirst was only a show, because the King endured much, even in the womb of his mother
SB Canto 1
Upon returning, he began to contemplate and argue within himself whether the sage had actually been in meditation, with senses concentrated and eyes closed, or whether he had just been feigning trance just to avoid receiving a lower kṣatriya.
The King, being a devotee of the Lord, did not approve of his own action, and thus he began to wonder whether the sage was really in a trance or was just pretending in order to avoid receiving the King, who was a kṣatriya and therefore lower in rank. Repentance comes in the mind of a good soul as soon as he commits something wrong. Śrīla Viśvanātha Cakravartī Ṭhākura and Śrīla Jīva Gosvāmī do not believe that the King's action was due to his past misdeeds. The arrangement was so made by the Lord just to call the King back home, back to Godhead.
According to Śrīla Viśvanātha Cakravartī, the plan was made by the will of the Lord, and by the will of the Lord the situation of frustration was created. The plan was that for his so-called misdeed the King could be cursed by an inexperienced brāhmaṇa boy infected by the influence of Kali, and thus the King would leave his hearth and home for good. His connections with Śrīla Śukadeva Gosvāmī would enable the presentation of the great Śrīmad-Bhāgavatam, which is considered to be the book incarnation of the Lord. This book incarnation of the Lord gives much fascinating information of the transcendental pastimes of the Lord, like His rāsa-līla with the spiritual cowherd damsels of Vrajabhūmi. This specific pastime of the Lord has a special significance because anyone who properly learns about this particular pastime of the Lord will certainly be dissuaded from mundane sex desire and be placed on the path of sublime devotional service to the Lord. The pure devotee's mundane frustration is meant to elevate the devotee to a higher transcendental position. By placing Arjuna and the Pāṇḍavas in frustration due to the intrigue of their cousin-brothers, the prelude of the Battle of Kurukṣetra was created by the Lord. This was to incarnate the sound representative of the Lord, Bhagavad-gītā. So by placing King Parīkṣit in an awkward position, the incarnation of Śrīmad-Bhāgavatam was created by the will of the Lord. Being distressed by hunger and thirst was only a show, because the King endured much, even in the womb of his mother. He was never disturbed by the glaring heat of the brahmāstra released by Aśvatthāmā. The King's distressed condition was certainly unprecedented. The devotees like Mahārāja Parīkṣit are powerful enough to forbear such distresses, by the will of the Lord, and they are never disturbed. The situation, in this case, was therefore all planned by the Lord.