Usually people say this sentence in a defensive way, thinking that they are saying something right, in order to show whoever they are talking to, that they are confident about what they are saying, to make their arguments sound more serious maybe ? But no matter what is the reason behind saying it, I think that this phrase is wrong, and when saying it, you really did not know what your partner in the discussion was going to say.
Let us then, suppose that you are talking to someone, and you were about to say something to him, but you were afraid of his reaction. You then stared anticipating his reaction to what you were about to say. Let us say you came up with 4 reactions. You were not sure which one of the reactions was the right one. So what you decided to do was choose one of them (the best plausible or whatever criteria), and you threw it at him.
Now he is saying something. Something that matches one of the reactions you anticipated. And because you recognized that reaction, you thought you knew that he was going to say what he just did say. But then again, the only reason to say “I knew you would say that!” is because your first choice of anticipation you made from 4, was not right.
Symbol definition :
(Y) stands for You
(H) stands for Him
(S) stands for sentence
(AX) stands for anticipation number X
The solving part :
(Y) says (S)
(S) has 4 anticipations : (A1), (A2), (A3) & (A4)
(H) chooses (A3)
(Y) says (A1)
(H) recognizes (A1)
(H) says “I knew you would say that!" (‘that’ being (A1))
(A1) is different from (A3)
then with this logic we could conclude that ”I knew you would say that!" is wrong thing to say in most cases.
have a good day :^)