I think, everything is obvious. You have high frequency interferences, showing as spikes in the input waveform. The signal isn't
actually distorted, but it's not clearly triggered due to the interferences.
You should know better, what the interfering signals are, looks like SMPS, UPS or VFD borne. The problem is, that these interferences
also spread across the ground connections, so it may be difficult to make a correct oscilloscope measurement of any circuit
node in this case. I can't see from your photos, if you're using a short probe ground clip as required to minimize measurement artefacts.
Assuming, that the measurement ground reference is realiable, the result can be simply explained with the low-pass filtering of the
probed RC circuit. But considering the previous mentioned problem of a correct ground reference, the situation may be more complex.
Some points haven't been mentioned yet, e.g. selected oscilloscope bandwidth.
In any case, it's an all-days measurement situation, at least if you are dealing with power electronics respectively low level
signals even in an electrically "clean" enviroment. It may be difficult to indentify the exact interference source, but the interfering
signals exist, surely in your measurement and most likely also at the circuit input. You have to take it into account.