The first image: it is almost parallel to the image plane. In this case the vanishing points in the image are poorly observed and the constraints on the camera intrinsics are vague as a consequence.
Camera calibration from vanishing points in images of architectural scenes, BMVC (1999),
by R Cipolla, T Drummond, D Robertson
Also, the distortion correction is wrong only in areas where there is no observed data (along the boundaries of the image). This tells us that the calibrated model is bad at extrapolation but good at interpolation. This is a classic example of over-fitting.
My guess is that in the second image, the intrinsics are better constrained because of better depth variance. The constraints on the intrinsics allow better estimation of the distortion using the available data.