Why do bacteria eat enamel?
While I can't find any specific sources regarding bacteria eating enamel, I highly doubt this is what's happening in our mouths. I doubt this because your point is likely true - minerals in enamel provide no added benefit to the bacteria. I would ask a dentist about this to be sure though.

However, what is certainly true is that the acid produced by the bacteria in dental plaque is what causes tooth decay and gum disease. More specifically, S. mutans is the primary culprit behind dental plaque. Most notably is that S. mutans is an anaerobic organism and because it doesn't require oxygen to respirate, the pathway results in lactic acid as a by-product. This lactic acid is what makes enamel prone to demineralization and if untreated, can irritate your gums, causing gingivitis. It's also worth noting that not all bacteria will do this - not even all anaerobic bacteria that release lactic acid will do this. S. mutans is likely one of the few bacterial species that can survive in your mouth because of it's ability to withstand low pH environments in your mouth and form biofilms - able to nicely stick onto teeth.

S. mutans has no need to munch through enamel or gums. Much of what it breaks down for respiration can be easily obtained from the food and drinks that are left behind after a meal - mostly sugars such as sucrose.