When you play a MIDI file, you are expected to literally provide the musical instruments to play the musical score with. In the past this was provided by your sound card with a synthesizer, and in more recent times provided by your operating system as a software synthesizer.
The reason behind MIDI being structured this way was to reduce file size. Remember, we are talking the 1980s when MIDI was invented; disk space was expensive. Storing the raw sound data requires a lot of space, but MIDI only needs to store the musical scores which are significantly smaller. The actual sounds were stored locally and synthesized by the sound card.
In an era where disk space is worth pennies, MIDI is an obsolete solution for a problem of a bygone age. But the technical considerations and compromises that went into its design and the innovative creations that composers made within the technical restrictions imposed are nonetheless a hallmark of computing history.