Why won't good journals retract papers that were proven wrong? I saw some research papers still present in good and reputed journals even though they were proven wrong by other papers. The subject is cryptography.

If a paper is proven wrong, it does not contribute a valid result to the corresponding topic. What is the reason for keeping them intact, which can cause issues for newbies?
Without knowing the specifics of the papers you are referring to, it's difficult to respond exactly.  In general, however, there is more than one way for a paper to be "wrong", and most "wrong" papers should not be retracted.

The thing is, a paper typically contains more than just a single assertion. When you say that a paper is "proven wrong", it sounds like you are referring to the high-level conclusion, e.g., "Cryptographic protocol X is secure against replay attacks."  Then somebody else comes along and shows that actually, there is a way to do a replay attack after all.

Such a refutation, however, often does not actually invalidate any of the actual technical methods or results presented in the original paper.  Instead, it will more typically involve showing that they were insufficient in some way for supporting the high-level conclusion.  For example, the problem statement might have been formulated too narrowly, or the authors might have drawn a conclusion that was stronger than their evidence actually supported.

In such a case the conclusion of the paper may indeed be wrong, but everything else is indeed correct.  Careful phrasing by the original author may in fact mean that the conclusion is even still technically correct (e.g., "According to this formulation, cryptographic protocol X is secure against replay attacks.").  In short, the results stand but their implications are much less than the original investigator may have believed.

Bottom line: many refutations may be understood as changing our interpretation of results derived using valid methods, while retraction is generally reserved for invalidating flaws in the methods themselves.