Following delivery of the placenta, the mother is experiencing vaginal bleeding. After massaging the uterine fundus and allowing the mother to breastfeed, the bleeding stops. This occurred because: