This is one of those areas where the opinions of the typical boss are at considerable variance with reality. Studies have shown that staying home when you need to is distinctly less harmful to overall productivity than going to work and infecting others. Bosses who think you should drag yourself in unless you're dead on your feet are either unaware of this fact, or (and this is the truth of the matter in my opinion) their real reason for taking this stance has nothing to do with productivity and everything to do with the boss wanting you to demonstrate a subservient and obedient attitude.
Unfortunately for the working parent, you don't really get any advantages by staying home when you're sick. Nobody is going to be bringing you chicken soup and putting cold washcloths on your forehead for you. Instead you'll be changing diapers and filling bottles and making lunches and washing dishes, because all that stuff just has to be done regardless of what condition you're in.
This might be the real reason so many people go to work when they're sick. You can take it easy at work for a day or two if you have to. You can work slowly. You can take a lot of breaks. In a worst-case scenario, your boss can be put off for a bit. Your two-year-old cannot.