If you watch the Fifth Doctor's swan song The Caves Of Androzani (and it's well worth the watch) you get your answer.
Basically the Fifth Doctor has a bit of complex about death via Praxis range gas poisoning which the other incarnations tend to ignore (11 does mention it now and then). When exposed to said gases the celery turns purple and the 'cure' is to eat celery so win, win (in the highly unlikely situation of being poisoned by Praxis range gases).