>>23359358That's because Gyarados was originally supposed to be be the final evolution in the Dratini line, and Dragonite was supposed to be the evolved form of Magikarp.
Their sprites got swapped. Notice how Dragonite's antennae look like Magikarp's whiskers.