Knowing long-term effects (1+ years) is not a precondition of approval for most vaccines. It just so happens that vaccines usually take a long time for approval, so we end up knowing long-term effects as a side effect.
This is because there generally isn't a known mechanism for vaccines to have long term effects. Not ruling out the possibility, but we understand how vaccines work pretty well. Also, most vaccines are subject to a cost/benefit analysis anyway (we don't give the rabies vaccine out to everyone) so the miniscule chance of having long term effects has to be weighed against the much more likely long term effects of the disease.
This is because there generally isn't a known mechanism for vaccines to have long term effects. Not ruling out the possibility, but we understand how vaccines work pretty well. Also, most vaccines are subject to a cost/benefit analysis anyway (we don't give the rabies vaccine out to everyone) so the miniscule chance of having long term effects has to be weighed against the much more likely long term effects of the disease.