Purpose of the Schmitt trigger in this midi circuit
The fact that they're Schmitt triggers is largely irrelevant. Putting two of them in series like that is doing two things for you:


It's converting the logic levels from the 3.3 V of the RPi to the 5.0 V that the MIDI interface requires.
It's isolating the RPi from any bad things (ESD) that might come in via the MIDI connector.