These symptoms occur due to the body's immune response to the vaccine. When a vaccine is administered, it introduces antigens that trigger the immune system to produce antibodies. This process can lead to temporary symptoms as the body mimics what it would experience if it were fighting an actual infection.