Series resistor on op-amp input
where the series resistor is placed after the TVS diodes. What is its
purpose?

The series resistor is chosen by looking at the maximum permissible input current of the op-amp. This is usually stated on most op-amp data sheets. Here's what your data sheet says: -

So, if your input voltage is clamped at 18 volts as per the SD05C data sheet: -

Then it's a bit of simple maths to figure out the current through R40 (1 kΩ). The voltage difference is 18 volts  - 5 volts  = 13 volts. And, the current through the resistor will be 13 mA. And that means the resistor value is about ten times lower than it should be.

What is its purpose?

Hence, the input resistor is to protect your op-amp input from receiving a current greater than that stated in the data sheet. If that current were exceeded then you stand a chance of damaging the op-amp. Regarding the value being too low (as per my calculation): -
I can't get inside the mind of the person who designed this circuit and, there may be some other restriction on voltage and current to the left on the input connector J8. That may limit the peak voltage to 7 volts at which point the current into the op-amp input would be limited to 2 mA.
My best guess is that this has been incorrectly designed using the reverse voltage drop of the TVS at 1 mA (6 volts) instead of the maximum clamping voltage (18 volts).