Before AMG was a "real/independent" brand (aka "only" a subdivision of Mercedes), their press/test cars frequently had S MA plates and the regular Mercedes had S MB. Since then, AMG turned into a "real" brand, and therefore they use LB MA.
Of course, there are exceptions (EQ-Line and mules frequently have BB QS), but a merc on LB MA is almost always AMG-Owned