It really depends on your goals, doesn't it? When using anabolic steroids, you'll build and retain more mass calorie for calorie compared to not using them. That's a given. If you're aiming to get lean and shredded, then you obviously need to pay more attention to your diet than if you're just trying to get as big and strong as possible.
In my opinion, you do need a healthier diet. When I eat junk food, my blood pressure goes through the roof, and I get acne, among other issues. It's not worth it, so I usually eat about 80% healthier, cleaner foods.
Steroids can help preserve muscles when you're at a very low calorie intake. For instance, Anavar is prescribed to HIV patients with muscle wasting disease so they can retain their muscle mass even when they're very sick.