MissingNo was a glitch, but it was originally put in there because it was going to be an actual Pokemon. They just didn't completely get rid of the data.