The SI system recommends a space between a number and its units degree in most cases except for the rare symbols for degree, minute, and second for plane angle, as in 30° 22′ 8″. Yet it's very common at photo.SE to denote lenses as 50mm and not 50 mm. To me as a scientist I find it rather disturbing but I can accept it if it's so common in the photographic that it can stand as an exception to the rule. How should the matter be treated?
The lack of spaces between numerals and units is not just accepted, but very standard in photography. Note that this kind of thing is style, not grammar, if that helps you feel better about it.
In specific, it is typical to use no space when the measurement is used as part of a name — 35mm film, or a 200mm lens. This is correct in photography and should not be changed. I can see the argument that a space should be used in other cases, for actual measurements, not names.
Perhaps one factor there is that the "measurements" in names is nominal — a 50mm lens may actually have a focal length of 53 millimeters, and that might change with focus distance.
This phenomena where the space is omitted in names is common elsewhere, too — "400m dash", for example (although I would never expected it to be the case for non-abbreviated units — "400meter dash" looks clearly wrong).
I think this convention might also be reflected in spoken language, as well. When saying measurements out loud, often the unit gets emphasis, or at least the emphasis is even between the value and the units. When saying "85mm lens", however, it sounds funny if the speaker emphasizes "mm" — the emphasis should clearly be on the "85". My hunch is that the lack of a space is a subconscious attempt to encode that.
But, that said, once the convention is common in the field, you'll see it in actual measurements, too. I agree that this is technically wrong in many accepted styles, like the SI guidelines you refer to, but note that it is correct under AP style as used in most newspapers.
National Geographic's style guide says that a hyphen should be used when the measurement is part of a compound modifier, like "25-meter drop", but also notes:
In photographic data, film and lens sizes are often written without a hyphen:
a 35-millimeter slide; 35-mm slide or 35mm slide
Overall, I agree with Joanne's comment above — it's too trivial alone. If you have other improvements, it doesn't hurt to add spaces when it's not lens size, film type, or the like — but don't bother with edits just for this, and please don't add spaces in photographic data.