Stability problems are caused when the loop gain (gain of the complete open loop) has at least two poles. In this case, the slope of the loop gain function at the unity.gain crossing can be rather close to -40dB/dec.
That means: The phase of the loop gain function is pretty close to the -180deg line. (Remember that for -180deg - together with the sign inversion at the inv. input - we would have positive feedback causing oscillation).
The first pole (-20dB/dec) is caused by the open-loop gain of the opamp and the second one is caused by the feedback lowpass (RG||Xin)/[(RG||Xin)+RF] with Xin=1/jwCin.
This unwanted effect can be cancelled using the principle of "matched voltage division". It can be shown that a voltage divider consisting of two R-C parallel combination has no frequency dependence when R1C1=R2C2 (equal time constants) or R1/R2=C2/C1 . (In your case: RGCin=RFCF).
When CF is made larger than necessary, we ave a kind of "over compensation" with an improved stability margin at the cost of reduced closed-loop signal bandwidth.
As another example: Oscilloscope probes uses this principle for compensating the unwanted influence of the (parasitic) input capacitance of the HF input.