I fully agree with you. Health is the most important think we have to maintain for life. See a doctor and get a proof of sickness.
But is is the pilot's responsibility to call sick ASAP in order not to affect the air OPS, and this is not always an easy task cause you never know how bad or good your sickness will be in the next coming hours...if you see what I mean.
I am also sure that somewhere the companies check your yearly absenteism and that this might affect you ability to get upgrades etc... And I think this is wrong !
Have you heard stories of pilots being sacked for being too often ill ?