Infection - bacterial infections such as endocarditis are much rarer these days thanks to antibiotics, but can damage the valves of the heart as well as other tissues. Viral infections can damage the heart muscle leading to heart failure, or cause abnormal heart rhythms.