SB 3.14.29

brahmādayo yat-kṛta-setu-pālā
 yat-kāraṇaṁ viśvam idaṁ ca māyā
ājñā-karī yasya piśāca-caryā
 aho vibhūmnaś caritaṁ viḍambanam
Word for word: 
brahma-ādayaḥ — demigods like Brahmā; yat — whose; kṛta — activities; setu — religious rites; pālāḥ — observers; yat — one who is; kāraṇam — the origin of; viśvam — the universe; idam — this; ca — also; māyā — material energy; ājñā-karī — order carrier; yasya — whose; piśāca — devilish; caryā — activity; aho — O my lord; vibhūmnaḥ — of the great; caritam — character; viḍambanam — simply imitation.
Translation: 
Demigods like Brahmā also follow the religious rites observed by him. He is the controller of the material energy, which causes the creation of the material world. He is great, and therefore his devilish characteristics are simply imitation.
Purport: 

Lord Śiva is the husband of Durgā, the controller of the material energy. Durgā is personified material energy, and Lord Śiva, being her husband, is the controller of the material energy. He is also the incarnation of the mode of ignorance and one of the three deities representing the Supreme Lord. As His representative, Lord Śiva is identical with the Supreme Personality of Godhead. He is very great, and his renunciation of all material enjoyment is an ideal example of how one should be materially unattached. One should therefore follow in his footsteps and be unattached to matter, not imitate his uncommon acts like drinking poison.