For the same reason they gave every Dragon a Ground/ Flying subtype (with the exception of Kingdra)- because Gyarados is really freakin' powerful. And hey, the subtype does give him a resistance to Grass.
On a side note, the subtype can actually be useful to draw out Electric attacks.
1) Gyarados is sent out.
2) Gyarados switches to Electivire.
3) Enemy uses Thunderbolt, not realizing that Gyarados would switch out.
4) Thunderbolt hits, Motor Drive activated, Electivire sweeps whole team. GG.