On Yamaha keyboards the GM voices are actually a subset of the XG voices, which the XG documentation refers to as "capital" tones. In particular, there are 128 XG voices which have Program Change values of 0 through 127 (which are usually displayed and listed by Yamaha as 1 through 128), and which have Bank Select MSB and LSB values of 0, and those 128 voices directly correspond to the 128 GM voices.
I imagine that Roland does the same thing with their GS voices, such that 128 of the GS voices directly correspond to the 128 GM voices.
Likewise, I believe the original 128 GM voices are a subset of the 256 GM2 voices.
Anyway, if the GM, GM2, and GS voices which are available on Yamaha keyboards are actually just XG voices-- that is, where the Bank Select MSB/LSB and Program values for the GM, GM2, and GS voices have been mapped to select the nearest equivalent XG voices-- then the reason why the GM voices selected by the MIDI file sound much better might simply be due to the specific voice parameters and effects used. Yamaha's XG voices can sound very, very good, but it seems like Yamaha usually sets the volume levels way down on the XG preset voices, which makes those voices sound "weak" in comparison to the panel voices. But if you create a user voice that selects a GM (or XG) voice and tweak the volume, reverb depth, chorus depth, and other voice-related parameters, you can get some very good results.