SB 10.46.40

sattvaṁ rajas tama iti
 bhajate nirguṇo guṇān
krīḍann atīto ’pi guṇaiḥ
 sṛjaty avan hanty ajaḥ
Word for word: 
sattvam — goodness; rajaḥ — passion; tamaḥ — and ignorance; iti — thus called; bhajate — He accepts; nirguṇaḥ — beyond the material modes; guṇān — the modes; krīḍan — playing; atītaḥ — transcendental; api — although; guṇaiḥ — using the modes; sṛjati — He creates; avati — maintains; hanti — and destroys; ajaḥ — the unborn Lord.
Translation: 
Although beyond the three modes of material nature — goodness, passion and ignorance — the transcendental Lord accepts association with them as His play. Thus the unborn Supreme Lord utilizes the material modes to create, maintain and destroy.
Purport: 

As stated in the Brahma-sūtra (2.1.33), loka-vat līlā-kaivalyam: “The Lord performs His spiritual pastimes as if He were a resident of this world.”

Although the Lord does not favor or abuse anyone, we still observe happiness and suffering in this world. The Gītā (13.22) states, kāraṇaṁ guṇa-saṅgo ’sya: We desire to associate with various qualities of material nature, and thus we must accept the consequences. The Lord provides the field of material nature, in which we exercise our free will. Foolish nondevotees not only attempt to cheat the Lord by trying to exploit His nature, but when they suffer the reaction they blame God for their own misdeeds. This is the shameless position of those who are envious of God.