Breast feeding causes prolactin secretion. There is a reflex loop that goes straight from the nipples to the hypothalamus. If there is nipple stimulation for any reason (in males as well as females), the hypothalamus signals the pituitary to secrete prolactin. And as we now know, prolactin in sufficient quantities causes reproduction to cease.