Corticosteroids and anabolic steroids are totally different chemicals; it’s the name ‘steroid’ that confuses people.
Corticosteroids can cause weight gain via holding water and fat gain following metabolic changes. Anabolic steroids also can cause water retention, but mainly the increase weight is through building muscle and enhancing glycogen stores. It’s also worth noting many anabolic steroids also increase red blood cell levels.
With careful diet and training, it is (apparently) very possible to use low-moderate doses of anabolics and see no changes to weight, as they also create metabolic changes whereby it’s possible to gain small amounts of muscle in a calorie deficit whilst also losing body fat. Throw in the enhanced recovery capabilities and the beneficial side effect of higher red blood cell levels, and you can see why it’s useful for those looking to abuse it.
However, it is supposedly quite hard to get round the testing system for anabolics, not least as the tests for them are now pretty sophisticated and well-established. Hence riders looking for other substances that are harder to detect. When EPO and HGH first started being used, there were no tests for either (which is what first led to the blood passports, where baseline haemocrit was looked at, amongst other things).