You might need antibiotics because some people with heart problems have a greater risk of endocarditis, a heart infection. Antibiotics help prevent endocarditis, caused when bacteria travels from the mouth to the bloodstream and then to the heart. People with artificial heart valves or prosthetic (man-made) materials are at risk for this type of infection.
In the past, many people with other heart conditions (such as bicuspid valve disease and mitral valve prolapse, for example) took antibiotics as a precaution. Dentists no longer prescribe antibiotics before dental work for those types of conditions.