Well, Wikipedia’s article on Pupils said this:
“The orientation of the slit may be related to the direction of motions the eye is required to notice most sensitively (so a vertical pupil would increase the sensitivity of the eyes of a small cat to the horizontal scurrying of mice). The narrower the pupil, the more accurate the depth perception of peripheral vision is, so narrowing it in one direction would increase depth perception in that plane. Animals like goats and sheep may have evolved horizontal pupils because better vision in the vertical plane may be beneficial in mountainous environments.”
And the article on Goats says this:
“Goats have horizontal slit-shaped pupils, an adaptation which increases peripheral depth perception.”
Also, someone once told me that it made it easier for them to see what they were doing/eating at night.