People don't realize it, but when surgery requires any foreign body placement such as hip or knee prosthesis, or mesh pacemaker, etc., any time bacteria enters the body as with a strep throat, urinary tract infection or wound infection anywhere in the body, the bacteria are carried in the blood stream throughout the body. During their trip past a foreign body, that foreign body can be "seeded," i.e., the bacteria can attach to the surface of the foreign body. Antibiotics can heal most surrounding tissues, but there are no blood vessels to carry them onto the prosthesis itself. So, when the infection appears to have been resolved, and the antibiotics discontinued, the still alive bacteria not gotten to on the surface of the implant then in turn re-seed the surrounding tissues and the infection starts all over again. A knee prosthesis is buried in the tibia on one end and the femur on the other. Taking the antibiotics away could infect either or both of these bones. Bone infection (osteomyelitis), once established is extremely difficult to treat. The foreign body prosthesis with its infected seeds must be removed and replaced with a new sterile one (or preferably many times with a temporary spacer) after trying to cut out the infected portions of bone, thus shortening the leg. If the bone removal is not adequate and still infected bone is left behind (because it is very difficult to 100% be assured that this is not the case), the vicious cycle begins all over again.........antibiotics, removal of more infected bone (more shortening of the leg) and replacement with a new "clean" prosthesis.
For years, when a breast augmentation using silicone gel or or saline implants (both of which are foreign bodies) have been performed, my patients have been instructed to always have prophylactic antibiotics given prior to dental cleaning or other work, immediately following the diagnosis of a bacterial upper respiratory infection, or a diagnosis of a bacterial infection in any part of the body including traumatic wounds. You don't really think about it, but a human's mouth is considered much dirtier than a dog's mouth. So when the teeth are cleaned or worked on (including gum work), the gums are traumatized and tiny blood vessels are consequently opened. This allows for access into the blood stream of a myriad of bacteria living in the mouth. These bacteria can be dispersed throughout the body and onto any existing foreign body surface, just as "Johnny Appleseed" did. Normal body tissues can normally fend off potential infection by using the body's own immune mechanisms. However, like after-the fact antibiotics, the immune system cannot reach the implant surface to avoid the implant is seeded. Therefore the prophylactic antibiotics are used to "sterilized" the blood system before the live bacteria can reach the foreign body implants to infect them.