Magikarp is not the only Pokemon that only knows Splash for awhile you know. Hoppip was like that too. In fact, you could call it the Magikarp of generation 2. Azurill, Spoink, Feebas, Wailmer, Wynaut, and Buneary are also Pokemon that use this.
Why it is there however, is pretty obvious. For some of these Pokemon it's to make them less easy to train since that's the only move they can know for awhile and discourages people from using them even though they may be much more powerful then they seem. Pokemon that can know other moves as well as splash ether have it so it can take up a move slot or it serves as making them weaker targets to help train your Pokemon. Splash can also be useful in battle in several cases. For instance, if an opponent uses Metronome, Mimic, Bide, Counter, etc, using Splash (or having Splash as move that exists) can make it more difficult to pull off such maneuvers.