If the vaccine is effective,please explain how an unvaccinated person puts a vaccinated person at risk.
Although in theory, a vaccinated person should be safe even if exposed to someone who is unvaccinated, the fact is that not every vaccine is 100% effective in all recipients. If that vaccinated person is one of the unlucky people who have an immune system variant that prevents them from responding fully to a vaccination, then exposure to a non-vaccinated person might actually endanger their life. That is because the problem that prevents them from fully responding to the vaccine also makes them more susceptible to serious effects from the illness the vaccine is designed to prevent.
The primary populations that are endangered by unvaccinated people are infants who are too young to vaccinate and people over age 65 whose immune systems are declining. Whooping cough, for example, can be so mild in an unvaccinated person that the person does not even know they have the disease. But if that person comes near an unvaccinated infant, the infant can die from the disease.
For example, I have had the full series of Hep B vaccinations. I never developed antibodies. I can get Hep B just as easily as someone who has never been vaccinated.
Another example: My friend's son contracted measles even though fully vaccinated. Evidently, he never responded with antibodies when vaccinated.