How would you know? You feel unwell and have symptoms. I dare say at least once in your life you've stayed off work because of the flu.How would I know if I am infected with influenza?
You want me to carry out daily testing for all known viruses?
What do you think the environmental impact of this would be if everyone does that?
Do you want everyone in the world to do this, or just people in certain countries?
Without descending into a rabbit hole of questions that don't leas anywhere other tying discussions in knots. it's good sense to not spread virus's around if you think you've got one. If you can test and make sure, all the better.
I mean, if i was coughing all over the place, or had a sore throat and felt exhausted i'd probably work from home, or take a day off if i thought if i thought i was sick and transmissable, whatever it was. We've all got vulnerable grandparents or elderly relatives, our friends may be on treatments for other things that weaken immune systems.
Some people have weakened immune systems and don't even know.
So, if you think you've got something transmissable, it's usually a good idea to stay off and find out if you can.