The Supreme Lord, Kṛṣṇa, desired to utilize the opulent financial strength of Mahārāja Nanda for worship of the cows, and also He wanted to give a lesson to Indra, the King of heaven. Thus He advised His father to perform worship of go, or the pasturing land and the cows, with the help of learned brāhmaṇas.
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
अयाजयद्गोसवेन गोपराजं द्विजोत्तमैः । वित्तस्य चोरुभारस्य चिकीर्षन् सद्व्ययं विभुः
ayājayadgosavena goparājaṃ dvijottamaiḥ | vittasya corubhārasya cikīrṣan sadvyayaṃ vibhuḥ
SB 3.2.32