Because some Mutations change the DNA's sequence, but they do not change the function of the protein that is made by the gene. Most of the time, gene mutations are repaired by enzymes before an altered protein is actually produced. DNA repair is an important process or else everyone's DNA would be seriously messed up.
by injecting the weakened virus into your body it helps the body familiarize and create the right antiviruses for the virus so that if it ever gets in your system you can actually fight it.