This is a funny protein as it is super important for the existance of S. pyogenes. If it is knocked out S. pyogenes is basically nonvirulent.
There is significant antigenic variation and (more then 150 types) which mean you have limited cross protection. It has a negative charge so repels phagocytes and it inhibits C3b and therefore prevents opsonisation via activating factor H which turns down complement?
It binds fibronectin and is therefore an adhesin as well.
It is the connection between Streptococcus pyogenes (Group A streptococcus) and Rheumatic fever/Glomerulonephritis. This is because antibodies your immune system makes to M protein can cross react to myosin in the heart, causing damage and eventual Rheumatic fever & Rheumatic heart disease. Glomerulonephritis is from immune complexes clogging up glomeruli (causing damage).