Spaceflight can alter the functioning of the immune system, making astronauts more susceptible to infections and illnesses.