Cancer treatments such as chemotherapy and radiation can damage the body's immune system, reducing its ability to fight off infections. Additionally, surgeries and invasive procedures increase the risk of bacterial infections. Prolonged hospital stays and the frequent use of medical devices like catheters and central lines further contribute to this heightened risk.