Before the 20th century, infectious diseases killed an incredibly high number of people, resulting in extremely low life expectancies. In developed countries, life expectancy was below 50, a far cry of where those numbers are at today. There wasn’t an effective method that mankind could use against threats such as pneumonia, syphilis, and smallpox, and communicable diseases was the leading cause of death in the United States.
Even in the midst of war, many of the deaths in combat could easily be contributed to the state of medicine at the time. Wounds would become infected and even unhurt soldiers could fall victim to unsanitary conditions out in the fields. After advancements were made in sanitary practices as well as the discovery of penicillin, the fight could be taken to bacteria in ways that were previously impossible.
Medical advancements such as the vaccine actually predate penicillin by a large amount, as they first started being used at the end of the 1700s. The works of Louis Pasteur and Joseph Lister towards the middle of the next century were also ground breaking, and there were drugs like arsphenamine that could be used to treat certain infections. However, that particular medicine had several severe side effects as well as being extremely difficult to handle.
Alexander Fleming is widely credited as the man who discovered penicillin in 1928, but his inability to communicate his ideas effectively kept it from being used for medical applications for several years. The first occurrence of the drug used to cure an infection came in late 1930, and it would later become mass produced in the 40s. Most notably, the number of deaths attributed to infection by soldiers in World War II drastically dropped due to them being armed with the antibiotic, and the life expectancy of mankind have soared since then.