Or maybe it had other physiological adaptations, like longer intestines for fermentation that helped it get the most out of its food, which is how manatees make herbivory work.
But, in spite of how well specialized teeth worked for herbivory, plant-eating would actually lead to the loss of teeth in another vertebrate group: the weird mammal relatives known as dicynodonts.