Śrīmad-Bhāgavatam · Text 6.4.8
Who is speaking and story frame
अहो प्रजापतिपतिर्भगवान् हरिरव्यय: ।
वनस्पतीनोषधीश्च ससर्जोर्जमिषं विभु: ॥ ८ ॥
aho prajāpati-patir
bhagavān harir avyayaḥ
vanaspatīn oṣadhīś ca
sasarjorjam iṣaṁ vibhuḥ
The Supreme Personality of Godhead, Śrī Hari, is the master of all living entities, including all the prajāpatis, such as Lord Brahmā. Because He is the all-pervading and indestructible master, He has created all these trees and vegetables as eatables for other living entities.
Read Śrīla Prabhupāda's purport on Vedabase.io