This phrase is usually only used sarcastically. It was first seen in when a person accused another person of something.
John said to Jane, "You murdered the farmer!"
Jane responds, "No! No! I'm innocent!"
John says, "That's what they all say."
This basically means John does not believe Jane. Every murderer claims he or she is innocent.