Skandham-5. Chapter-1 ( The Activities of Maharaja Priyavrata ). Slokam-13.

My dear Priyavrata, by the order of the Supreme Personality of Godhead, all
living entities accept different types of bodies for birth and death, activity,
lamentation, illusion, fear of future dangers, and happiness and distress.

Every living entity who has come to this material world has come here for
material enjoyment, but according to his own karma, activities, he must accept
a certain type of body given to him by material nature under the order of the
Supreme Personality of Godhead. As stated in Bhagavad-gétä (3.27), prakåteù
kriyamäëäni guëaiù karmäëi sarvaçaù: everything is being done by prakåti,
material nature, under the direction of the Supreme Lord. Modern scientists
do not know why there are varieties of bodies in 8,400,000 forms. The fact is
that all these bodies are ordained for the living entities by the Supreme
Personality of Godhead according to the living entities' desires. He gives the
living entities freedom to act as they like, but on the other hand they must
accept a body according to the reactions of their activities. Thus there are
different types of bodies. Some living entities have short durations of life,
whereas others live for fantastic durations. Every one of them, however, from
Brahmä down to the ant, acts according to the direction of the Supreme
Personality of Godhead, who is sitting in everyone's heart. As confirmed in
Bhagavad-gétä (15.15):

sarvasya cähaà hådi sanniviñöo
mattaù småtir jïänam apohanaà ca

"I am seated in everyone's heart, and from Me come remembrance. knowledge
and forgetfulness." It is not a fact, however, that the Supreme Personality of
Godhead gives direction to certain living entities in one way and other living
entities in another way. The truth is that every living entity has a certain
desire, and the Supreme Lord gives him a chance to fulfill it. The best course,
therefore, is to surrender unto the Supreme Personality of Godhead and act
according to His desire. One who does so is liberated.