It was probably a pre-historic taboo applied by nomadic tribes not to kill and consume cattle to provide optimal economical benefit. But scriptures say, its because its Kamadhenu : gives whatever you ask!
The latter reason makes a lot of sense now:
image via visual loop