Vaccines

No judgement I'm just generally curious being from the UK and it isn't a thing here.

Why do parents in America request people to have vaccines before seeing a baby? Vaccines only protect you and don't stop you passing on an illness? So I've never understood and just generally curious :) no judgement at all x