When something is referred to as "on X" where X is a chemical substance, it refers to the usual effects of X in people. Anabolic steroids can be used to enhance muscle mass and achieve an exaggeratedly muscular physique. Something that is "on steroids" follows the usual pattern of a person "on steroids", which is to become a bigger, exaggerated, enhanced version of the original. The construction is commonplace for different chemical substances - to describe something as "on acid" describes its surreal, "trippy" qualities, while describing it as "on speed" implies its energetic, frenetic nature.
: any of a group of usually synthetic hormones that are derivatives of testosterone, are used medically especially to promote tissue growth, and are sometimes abused by athletes to increase the size and strength of their muscles and improve endurance definition from m-w.com
Before (anabolic) steroids were regulated and eventually banned by the various sports' governing bodies, some athletes would take them to achieve muscle-building results in weeks or months that they normally either could not reach at all or would have reached only after years of effort. Becoming unnaturally large, unnaturally fast became the signature effect of steroids.
Anabolic steroids increase muscle growth. For an athlete, taking steroids makes them faster and stronger. Obviously this is cheating in competitive sports, and is why professiona athletes are so rigourously tested.
So "on steroids" means "enhanced", essentially. Because that's what they were / are used for. There's still a big steroid scene around some gyms, where certain members will sell it if you know who to ask.