Then you were precisely the type of person that mandatory vaccinations in schools is designed to protect. A (very) small percentage of people cannot be vaccinated for everything. But, because everyone else at school (or nearly everyone else) was vaccinated, your chances of contracting smallpox at school was very small.
For what it is worth... they don’t vaccinate anymore for Smallpox. They haven’t in some time. My youngest was vaccinated for it but it was done in China. They do vaccinate for chicken pox, measles and mumps.