Toronto. For most of the 1800s and early 1900s, cameras had a focussing means situated between the lens board and the media making the media-to-lens distance relatively unimportant. However; when camera bodies became rigid and the focussing means moved to the front of the lens board, the distance between the media and the lens mount (flange) became critical if a lens was to focus at infinity.
If that distance was wrong for a given lens, it could not focus at infinity on that particular camera. In the early days of minicams such as the Leica, lenses were fixed and a lens could be factory calibrated to suit a given body. Once interchangeable lenses were offered, the media to lens mount distance became critical. Briefly Leitz made lenses to suit a given camera and only offered the lens choices during manufacture.
A rapid change to a standard media-lens mount distance (29.9mm for Leica) resolved this problem and afterwards any lens would fit any Leica camera that had the standard distance. Thoughtfully, when the M-mount cameras went on sale, they had a media to lens mount distance of 28.9mm allowing a 1mm ring to be used between screw mount lenses and bayonet mount camera bodies (M-series).