The way I understood it was this:
In 1969, the Motion Picture Association of America was slapped together to provide ratings for films. The original ratings included G, PG, R, and X.
There have been other ratings, as well – GP was in there, once, and recently, NC-17.
Due to some kind of legal loophole, though, at one point, if you KNEW the film in question was going to be rated X (due to heavy adult content), you could simply hang the X on there yourself, and spare yourself the $3000 fee the MPAA would charge you.
You can’t do this any more; the MPAA owns the rights to their ratings now… (except X, for some reason).
Now, keep in mind that X used to be a perfectly respectable rating, and did not automatically mean “porn.” Midnight Cowboy, with Jon Voight and Dustin Hoffman, was the first and only X-rated movie to win an Oscar. The animated Fritz The Cat was rated X due to its hilariously filthy subject matter, although both these films would likely be rated R today, due to their lack of hardcore sex.
However, some folks, when they go out to take in a movie of an evening, know exactly what they want. And it ain’t Midnight Cowboy.
Certain theatres, then as now, specialize in porno movies. Naturally, these theatres make a point of advertising to their audience, as do the films themselves. And, back in the day when newspapers would still take ads for porn films, it was advantagous to advertise a film as “Double X!” or “TRIPLE XXX!” to distinguish one’s serious hardcore pornography from that of other theatres offering doubtful Jayne Mansfield movies, or award-winning performances by Dustin Hoffman, y’know?