Vaccines aren't a binary 100% or 0% effective tool, it's somewhere in the middle. If my 10 coworkers all get the vaccine, it reduces the probability of me contracting the virus, even if I got vaccinated myself. There is a communal aspect to the vaccine that you are missing here.