There’s got to be an origin for the idea that X always marks the location on the map where the buried treasure is.
The question is, is it a real origin, in that there really was a map of buried treasure marked with an X?
It certainly is realistic: a monochromatic map done with ink and parchment wouldn’t use color to denote objects, but symbols. A big fat X is as good a symbol as any, provided you can tell it apart from a simple intersection of two lines; and it requires no literacy.
Or is this a fanciful origin, coming from a particular book or film?