Why were animals like cows and pigs domesticated as a food source but deer and elk were not?

I suspect it had to do with ease of containment. Deer and Elk are rather large and can jump pretty high. Additionally, the antlers on the males would have made them dangerous, especially during mating season.