As Roy mentioned, you cannot count on MIDI downloaded from the Web. Unless the file comes from a reputable source, it likely contains all sorts of rando problems.
The key signature MIDI meta-event in a Standard MIDI File (SMF) is more of a hint than an actual command. It tells the player (or sequencer) what is supposed to be the key for the MIDI data in the other tracks. The player (or sequencer) can do what it wants with the information -- which is typically nothing other than to display the key.
I treat all Internet MIDI files as guilty until proven innocent.
All the best -- pj