By leaving yourself unvaccinated, you are bearing the risks of contamination. The risks that someone else takes leaving themselves unvaccinated is up to them.
They work by having the vast majority of people not carriers so that the few that don't end up protected directly are still protected.
This is sorta like having shitty brakes and tires. Sure you're the person most likely affected but there's a good chance your accident is going to mean harming someone that does have good brakes and tires.