Śrīmad-Bhāgavatam · Text 3.14.27
Who is speaking and story frame
यस्यानवद्याचरितं मनीषिणो
गृणन्त्यविद्यापटलं बिभित्सव: ।
निरस्तसाम्यातिशयोऽपि यत्स्वयं
पिशाचचर्यामचरद्गति: सताम् ॥ २७ ॥
yasyānavadyācaritaṁ manīṣiṇo
gṛṇanty avidyā-paṭalaṁ bibhitsavaḥ
nirasta-sāmyātiśayo ’pi yat svayaṁ
piśāca-caryām acarad gatiḥ satām
Although no one in the material world is equal to or greater than Lord Śiva, and although his unimpeachable character is followed by great souls to dismantle the mass of nescience, he nevertheless remains as if a devil to give salvation to all devotees of the Lord.
Read Śrīla Prabhupāda's purport on Vedabase.io