Antibiotics are often administered at the time of joint replacement surgery to reduce the risk of prosthetic joint infection.