Srimad Bhagavatam Canto 03, Chapter 12, Text 03

SB 3.12.3

drstva papiyasim srstim
 natmanam bahv amanyata
 manasanyam tato ’srjat
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
Seeing such a misleading creation as a sinful task, Brahma did not feel much pleasure in his activity, and therefore he purified himself by meditation on the Personality of Godhead. Then he began another term of creation.
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
Although he created the different influences of nescience, Lord Brahma was not satisfied in performing such a thankless task, but he had to do it because most of the conditioned souls wanted it to be so. Lord Krsna says in Bhagavad-gita (15.15) that He is present in everyone’s heart and is helping everyone to either remember of forget. The question may be raised why the Lord, who is all-merciful, helps one to remember and another to forget. Actually, His mercy is not exhibited in partiality towards one and enmity towards another. The living entity, as part and parcel of the Lord, is partially independent because he partially possesses all the qualities of the Lord. Anyone who has some independence may sometimes misuse it due to ignorance. When the living entity prefers to misuse his independence and glide down towards nescience, the all-merciful Lord first of all tries to protect him from the trap, but when the living entity persists in gliding down to hell, the Lord helps him to forget his real position. The Lord helps the falling living entity glide down to the lowest point, just to give him the chance to see if he is happy by misusing his independence.
Almost all the conditioned souls who are rotting in the material world are misusing their independence, and therefore five kinds of nescience are imposed upon them. As an obedient servitor of the Lord, Brahma creates all these as a matter of necessity, but he is not happy in doing so because a devotee of the Lord naturally does not like to see anyone falling down from his real position. Persons who do not care for the path of realization get full facilities from the Lord for executing their proclivities to the fullest extent, and Brahma helps in that procedure without fail.
Srimad Bhagavatam Canto 03, Chapter 12, Text 02
Srimad Bhagavatam Canto 03, Chapter 12, Text 04