Understand Vaccine first, They are given to make the body detect and take counter measure in case of actual infection.
As they are mutating / changing, old counter measure that body knew when vaccine was introduced in the body does not work.
Body has to fight again, and produce new counter measure for the infection.
Its the same reason,
A infect B,
A develop immunity for that infection,
B infect A,
A gets infected again.