The distinction the Associated Press Stylebook makes is the same one that Bryan Garner calls "the usual phrase" in Garner's Modern American Usage: Compare with means to identify similarities and differences between two things, and compare to means to identify only similarities.
It's the same distinction Theodore Bernstein makes in The Careful Writer and John Bremner in Words on Words. It wouldn't surprise me to learn that Bishop Lowth and Lindley Murray were also singing in the choir.
And yet, when you look at the page and a half on the subject in Merriam-Webster's Dictionary of English Usage, you can almost see the editors scratching their heads as they examine particulars.
They find that the "liken" sense of compare to is dominant with active verbs, as in Shakespear's "Shall I compare thee to a summer's day?"
But the picture in the "examine" or "compare and contrast" sense with the active verb is more diverse, to the end that it is not always possible to tell which sense the writer intended.
The editors then find to and with used about equally with the past participle, perhaps mainly in the "compare and contrast" sense. Maybe.
The editors also quote James. J. Kilpatrick (Imagine my reluctance to find myself in agreement with him) as saying: "I will never in my life comprehend the distinction between compared to and compared with."
The compared to/compared with distinction is one that I would identify as dog-whistle editing, the sorting out of distinctions at a frequency that most human ears cannot hear. I suspect that changing the one to the other on the desk, and back again in the slot, has wasted an impressive aggregate of copy desk time over the past century.
Hold fast to it if you will, but for my part, I would not be sorry if the editors of the AP Stylebook were to drop this entry over the side in the dead of night.