YANBU - obviously they're not selfish if they don't know they're coming down with something; but if they're ill, or only just over being ill (so, for example, less than 48h since last episode D &/or V), or know they've been in contact with someone unwell & may thus be incubating something (trotting along the child whose entire class has been coming down with chickenpox, for example) - that's Not On.
Hospitals are full of very unwell people whose bodies may, in the worst case scenario, not be able to cope with infections of this sort at all. Even people who're normally well are fairly likely to be more unwell than usual & to need an extended stay if they contract something while they're in hospital as it'll be complicated by whatever's landed them in hospital. Working to try to prevent the spread of norovirus within a ward is also more labour-intensive: it might be closed, but they'll have to play musical beds, & tbh having enough staff to ensure that they can split between nori patients & not really is NOT always a thing - & barrier nursing takes that bit more time to do everything for each patient, as gloves & aprons don't just need changing between each patient, but also between "clean" & "dirty" tasks. There's also additional paperwork; [ensuring] extra cleaning; & invariably extra bed changes (into special linen sacks that you have to get porters to collect asap)... the deep clean at the end the outbreak is a huge amount of work too.
King's College Hospital in London has huge stands up at the moment with alcohol gel pumps reminding everyone to clean their hands as they enter - the main message on them, however, is telling visitors that if they've been unwell they mustn't come onto the wards. I think there are details beyond the enormous headline message (as it were), but as I'm only going in for appointments I've never stopped to read... I think that the National Hospital for Neurology & Neurosurgery had something similar & the Guy's & St Thomas' Trust might have as well... 🤔
TBH though, a lot of hospital visitors behave selfishly: more than the permitted 2 people at a time; however many of them are there making enough noise for about 20-200; bringing in children & letting them roam about the ward (& go through people's stuff, try climbing on other patient's beds, mither at other patients, fiddle with mobility aids, crawl on the floor, run about the bay); use the patient toilet rather than take going out &/or be affronted by the patients being in the patient toilet when their child needs the toilet; make it clear they think patients are being precious if they don't want children Investigating IV/enteral feed pumps & lines/tubes; loudly eating huge amounts of smelly food; complaining to/nag at staff about imaginary [non-]issues; demanding the attention of staff (for non-urgent issues!) when they are dealing with other patients/on drugs rounds; staying well past the end of visiting hours & being furious when asked to leave...