They're very bad UX, and the main reason of opposition to Material Design as a whole. To answer your specific question and why they do it:
Raised buttons behave like a piece of material resting on another
sheet—they lift and fill with color on press.
Flat buttons are printed on material. They do not lift but fill with
color on press.
Button text should be all caps in languages that have capitalization.
For languages that don’t have capitals, consider using colored text
for flat buttons to make them stand out from normal text.
Basically, they're stuck on the paper concept, as if computers are paper. Furthermore, the raised buttons are even worse: they get more depth AFTER being pressed, which collides with almost any usability study to date.
All this being said, it's not correct that the links have to be black, your image is a monochrome example, but for colors on buttons, you need to relate to Material Design Color section. Furthermore, from the same page you took your image:

(and many more)
Finally, remember Material Design is a set of guidelines, not some kind of restrictive law. For example, I use Material Design A LOT, so we built a specific Material Design sets of scripts and style sheets. One of the things we do is to use raised buttons exactly opposed to Material Design recommendations. And we tracked and tested it and it works way better than what they recommend, no matter what Google says.
In short: there are reason for Google to do what they do. It doesn't mean you have to follow that