While the marking on many cats might resemble the letter M, it's actually just a natural pattern of fur coloration.
The markings on a cat's forehead are part of their unique genetic makeup, and the pattern can vary widely from cat to cat. Some cats have a very distinct "M," others have a less defined mark, and others have no markings at all on their foreheads.
The belief that all cats have an "M" is a common misconception that has been around for a long time. It's likely that people have noticed the resemblance to the letter M and started to believe it was a universal feature.