I don't know what the substance was for Pena's horses, but we used to legally use anabolic steroids (Equipoise, Winsthrall V) on racehorses before they were banned. Some horse tend to act "studdy" and get more agressive. I liked to give Equipoise to ones who were poor eaters... most would have a better appetite, especially fillies. If they won't eat well they won't race well.
I think in geldings it tends to mock the testosterone production lost when the horse is castrated. No research articles to back me up, just my experience. Hope that gives you an idea of what the thinking behind it might be.