The short answer is in the keen managing of heat cycles, which can be done in many ways so not to interfere with competing. Not every solutions works for every mare, so a scratch may happen but very rare. The reason is the strategy behind the managing and schedule of Thoroughbred breeding season. Breeding sheds around the county open in early to mid-February. The traditional opening day of breeding season is Feb. 15, but if a mare comes into heat, aka estrous, a little before that day managers know how to adjust their opening day. A mare’s gestation period is approx. 11 months, and all Thoroughbreds born in a given year become one-year-old on the next Jan. 1. Unlike stallions, mares are seasonal breeders. The don't cycle all year long, and will not accept a stallion when not in heat. The ladies rule here, and the men have no choice but let them, lol. Horses conceived in February will be born, or foaled, in January. That's why all horse are born or turn a year older in January. Note: All Thoroughbred racehorses have the same birthday unless they live in different hemispheres. Horses born in the Northern Hemisphere are considered born on January 1, and horses born in Southern Hemisphere celebrate their birthday on August 1.
P.S. I've provided the condensed version, there's definitely a lot more to this.
Let your life be driven with purpose!