Soreness occurs because the body's immune system is reacting to the vaccine. When a vaccine is administered, it introduces an antigen that mimics a pathogen. This triggers an immune response, causing cells to rush to the injection site, resulting in inflammation and soreness. The soreness is a sign that the body is developing the necessary immune response to protect against future infections.