It comes from finance - the rest of us just use "M" for million. I believe it's from Roman numerals (MM = thousand * thousand).
But "mille" means 1000. Specifically, it was the distance covered by 1000 paces from a marching Roman soldier. It's more consistent to measure paces than steps in the face of left/right asymmetries, so it's the unit implied when you just say you're marching 1000.
It still kind of reasons that if the idea for MM is to be more precise/clear than M, they’ve not done a very good job picking a clearer abbreviation.