I think it is to clamp the input signal to prevent damage to the MCU input. The lower diode will conduct if the input voltage goes more negative then one doode forward voltage drop below ground. The upper diode will conduct if the input goes more positive than 3.3 volts plus one diode forward voltage drop.