Well ... it is simple math. If the vaccine is effective 95% (pretty good on its own) and you come in contact with 10 sick people you have a good 40% chance to catch it.
That is the whole things with vaccines - the herd immunity is as important in protection as the vaccine itself. It is virtuous positive feedback loop.