Based on internal connection diagram these diodes act as a output voltage limiter, so the output of the OpAmp does not exceed 0/5V and to be safely connected with a MCU. Open the datasheet from your link on page 16 and look where pin (8) comes from.
Similar thing is done on Fig. 45. of the same DS, but there a zener is used.
The second schematic is not equal to the first.
The first makes voltage limiting on the low power circuit of the OpAmp and then the ouput emitter follower (as its name says) outputs a voltage with similar waveform but with higher load capability. The behaviour of the diode voltage limiter is similar to this circuit:
See how the signal is cut.
In your second schematic the output of the OpAmp will be like the first waveform, but because of the resitor divider will be scaled and moved up so its minimum is about 0V and its maximum is about 5.2V.
As long as the OpAmp works in a open feedback loop as a comparator (no feedback connection, maximum gain) both will output similar waveforms. The difference will apper when you close the feedback loop for some exact gain.
Another major difference of those circuits is their output impedance - while in the first it is about 100 ohm + Ro of the amplifier itself, in the second it is near a hundred kiloohms. This will have effect on the load you can attach to this circuit. The second will work with minimal distortion only with highest impedance inputs - about 1 MegaOhm, while the first can work with 2-3kOhm loads without an issue.