Lazarus was not made sick for the purpose of dying and being resurrected.

Jesus is telling us that every challenge by the works of the devil are opportunities for the HolySpirit to manifest to His glory.

His glory is for the purpose of drawing others to Himself.