system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What is pus and what function does it serve in healing wounds?
gpt
The comments about pus being a byproduct of infection and inflammation are quite right, although it's worth remembering that the creation of pus is specifically related to clearing infection from the body. White blood cells are attracted to the site of disease through processes like chemotaxis (migrating to sites that have high levels of chemicals either released by bacteria, or released by other white blood cells), and pus is formed as they engulf bacteria and then lyse/destroy them. All of the dead blood cells, bacteria and other breakdown products are what form pus (and by weight it's almost all white blood cells).

Like most processes relating to infection, you can have too much of a good thing, and while the inflammatory response is necessary for healing, pus building up to the visible levels the OP is thinking of is a sign that infection is not under control. If pus collects into an abscess, it's best to drain it away - even if you are on antibiotics, the pH changes considerably in the middle of an abscess, and antibiotics may not penetrate to the middle or work as well.

The belief that pus was necessary to healing is an old one, so the question is common - "laudable pus" was though to be a good part of healing and so encouraged until fairly recently in medical history!

Source: infectious diseases physician.