I’m looking at a MIDI file in a hex editor right now, it’s literally not a plain text file. Plain text files use carriage return and/or line feed characters to end a line of text. MIDI uses null to separate instrument notes and attributes.
Also, when was the last time you tried opening a MIDI file? Seems like half the media player apps and even some operating systems don’t even natively support it anymore.