Take a look at the curriculums.
Some of the schools I looked at basically offers an EdM, and the MAT/MST degree is literally the EdM + graduate courses in a specific field.
They are equivalent degrees, except people get EdMs either after they have already taught in their own field, are already a teacher, and very often, already have a Masters degree in their own subject.
And there are people who don't want to be teachers who get EdMs too I think, though I would think an EdD is more useful.