Vaccines build immunity the same way catching the real disease does, except without the full blown disease (& subsequent death, for many diseases). Vaccines and their method of action are far too often misunderstood.
The same immunity is built through (most) vaccines as if the bird had caught and survived a potentially deadly disease. I often hear people say they are making their birds "stronger" by not vaccinating, but the opposite is true. Vaccines are deliberate challenging of the immune system to teach it what to look for, like training your troops before battle how to fight a particular enemy. The real disease is more of an ambush of the immune system, and your troops are unarmed and uninformed.
The purpose is of vaccinating is:
1) often, catching the actual disease will kill the chicken.
2) Even if they survive, depending on what they caught, they may then be contagious forever, becoming carrier birds who have periodic re-infections. If even one of your birds catches something, they'll be contagious to the rest of your flock, causing you to either lose a bunch of birds, or have to cull &/or quarantine. You're also putting everyone else's flocks at risk if your survivor birds are then carriers...for example, if you were to sell one, or take it to a show or auction, or one of your poultry friends comes to visit/handle your birds, your "healthy' bird could spread disease to others.
3) Catching one disease, even a mild one, will weaken a bird's immune system and often they will then catch other diseases too, compounding the severity of their sickness and causing you to lose your bird from something simple that could've been vaccinated for, but weakened your bird enough that something more serious took root (Mycoplasma often operates this way).
So in reality, by NOT vaccinating, you're
1) saving money (MAYBE, depending on the value of your birds & what you have invested)
2) saving a few minutes of your time & effort,
BUT
3) risking a lot depending on what diseases are endemic to your location, and what weather patterns are like where you live (for example, MG often strikes in cold, wet weather); the risk also depends on your activities, whether you bring in a lot of birds or ship them out, or go to shows, or visit other poultry enthusiasts, or have wild birds on your premises, all of these are risk factors. Of course the risk is more the more money & care you've invested in your flock as well. If you're keeping show birds, its well worth it to vaccinate. Even the most expensive vaccine I know of is more cost effective to give compared to the price of just a couple show birds (and keep in mind each vaccine is usually good for at least 1000 doses).
4) And lastly, its far more costly to treat a bird after sickness (it may be costly even if you decide to cull rather than treat, assuming you are putting down a pricey show bird or your darling pet). Most antibiotics now require a vet prescription as of Jan 2017. Then you pay $40-80 for a couple courses of the antibiotic plus $50-100 vet visit fee. And antibiotics are losing effectiveness and don't work as effectively even when using multiple kinds, and you may have to buy multiple kinds.... You may also have to pay a diagnostics fee before the vet will give you a prescription, and if you try to avoid this fee, you may treat with the wrong antibiotics and see no improvement!
Unless you keep a small hobby flock from birds that cost you only a handful of dollars and aren't treasured pets, not vaccinating is probably a risk you would feel comfortable taking. When I lived in TX, the only disease we saw was the occasional fowl pox outbreak. In TN, there's a lot more to contend with with the harder winters. So if you have rarely seen disease in your flock in your location, then maybe its worth it.
Otherwise, the pros weigh heavily on the vaccination side!