The ink defense is a Decapodian feature used to flee enemies, and is immediately triggered when a member of the species is frightened or attacked, or for that matter on command.
When Leela decided to get surgery to give her two eyes, Zoidberg suggested that she gets an ink pouch to help her escape her enemies. Farnsworth said that was a stupid idea, calling Zoidberg an imbecile, he prepared to hit Zoidberg with his rolled-up newspaper, but Zoidberg sprayed ink at his face and ran off, wooping. Zoidberg later sprayed ink on Leela while she was having dinner with Adlai Atkins (3ACV09).
Zoidberg: Wonderful. And while you're under the knife, you could also get an ink pouch to help you escape your enemies.
Farnsworth: That's the stupidest idea I've ever heard, you imbecile!
[Zoidberg sprays ink on Professor Farnsworth and scuttles away.]
Zoidberg: Whoop, whoop, whoop.
Bender: Impossible. I'm triple sealed to prevent any, AHH!
[A stream of oil flows out of Bender's right side.]
Zoidberg: You call that an ink defense?
[Zoidberg sprays everyone with ink.]
[Zoidberg scuttles away.]
Zoidberg: Goodbye friends...