Many air breathing organisms sneeze as a way of clearing their airways of unwanted material. When the first bug floated into our primitive ancestors respiratory track and started multiplying more than its host desired it might not have yet had the reflex to sneeze. Once it did that pathogen would have had a very real evolutionary boost…. now it could spread much further and faster than it could possibly “hope” to do by itself.
For the host, sneezing makes sense. In one fell sweep it has significantly reduced its pathogenic load, and improved its ability to respire, demonstrating improved evolutionary fitness. Perhaps even raising its fitness from “death from pathogen” to survival.
For the species then an individual adopting sneezing is not completely disastrous because if without sneezing no organism could survive, there would be no species. But individual sneezing for the species still seems almost completely disastrous.
Ring-a-ring o’ roses,
A pocket full of posies,
We all fall down.
Now every member needs to have an immune system capable of fighting every pathogen that any member encounters. Previously if a member encountered a pathogen, this was limited to its own respiratory tract where it alone had to expend the resources to defeat the pathogen.
However would the pathogen have been limited to just its host? For an asexual and solitary species this could have been true but for herd and social species and or sexual encounters involving intimacy, the pathogen would likely have many opportunities to spread. Some pathogens are also airborne, detaching in microscopic drops of fluid from the air way of infected organisms as they breath.
If, if, sneezing is not increasing a pathogens ability to spread, an individual organism is just improving its fitness by sneezing and is not driving a tragedy of the commons. When I sneeze on a packed commuter train though I suspect our ancient ancestors raced each other (unintentionally, through evolution and selection) to the top of the personal – aka selfish – evolutionary ladder but drove the collective species downwards.