The dash is used for interjections and asides. Parentheses would have performed the same function, but they would have integrated the aside more subtly into the sentence.
Dashes indicate an interruption while parentheses signal a digression.
If you use dashes in this way, make sure that the sentence makes sense without them. I was thinking about biology and I had missed it. An important piece of information is now missing, and the sentence makes no sense. Therefore the sentence is incorrect even with the dashes restored. The dash has an ironic quality that is useful in informal writing.