A patient with a heart pacemaker received antibiotic therapy for streptococcal bacteremia (bacteria in the blood). One month later, he was treated for recurrence of the bacteremia. When he returned 6 weeks later, again with bacteremia, the physician recommended replacing the pacemaker. Why did this cure his condition?