Spaying heifers dates back to the 1850's when it was used to prolong the productivity of milking cows. These cows were spayed at 30 to 40 days after calving or before they came into estrus. This would prolong the milking period of these older cows for two to three years. The cows would also fatten faster on high energy feed for slaughter.
Holz, Charles C. and Evans, Lawrence E.
Iowa State University Veterinarian: Vol. 38
, Article 5.
Available at: https://lib.dr.iastate.edu/iowastate_veterinarian/vol38/iss2/5