I make reveal.js slides with markdown and convert with pandoc. Sometimes I want to post those slides so my students can access them, but I want to strip out the speaker notes because they usually aren't very useful to them.
I don't want to edit my source files; I just want the output correct. So, I could do something to the output html slides.
But: I also want to allow for the possibility that I'll want to output to other formats. So the best solution is to tell pandoc to do that filtering while it converts.