Well, don't listen to the dentists. They can't agree among themselves whether breastfeeding can increase the risk for tooth decay or not! But sure, if they don't have a better answer, they'll tell you it's your fault.
Decay is caused by acid that attacks teeth. The acid is produced by S. mutans bacteria. the bacteria eat sugar and the acid is a waste product. Almost everyone has these bacteria. But some people dont get cavities and some do. This is what dentists don't understand. if they knew who was going to get cavities and who wasn't, their job would be much easier. Since they don't, they tell everyone to brush, floss, rinse, etc. because it does REDUCE the risk of decay. It doesn't guarantee you won't get cavities.
I nursed DD1 for 4 years. She has 5 cavities, all in her molars, all very small.
I am still nursing DD2. Her top four front teeth are decayed and she's already had 3 small fillings in them. The dentist wants to cap them under general anesthesia but we are trying instead to stop the cavities from getting worse. Frankly, I don't want to spend thousands of dollars to have teeth capped when they are just going to fall out in 3 years.
BUT - brushing and flossing do help. We have started brushing/flossing twice a day and using calcium phosphate paste (not for brushing, but applied to the teeth after brushing) and nothing has gotten worse. In fact, the areas that the dentist filled have reformed - the fillings fell out, but the enamel regrew.
My teeth were not good as a kid - I have fillings in every molar. DH has much stronger teeth.
If I had to guess, I would say what others have said - that breastmilk by itself is actually protective, but mixed with leftover food/sugar bits in the mouth, it can spread those bits around and give those bacteria something to work on. In some kids, that will lead to decay. In others, it won't. Nobody knows why.
Oh - in the past, people lost a lot of their teeth. Kids, too. Tooth decay was more common and expected. It's only been for the past 60 years or so that we've been trying to reduce it.