So I bought this steel bar 240x5x0.5 cm and it has this kind of ugly, somewhat chippy surface: a dark gray layer. What is it? Should it be removed? In the picture, you can see how I'd sand it down, but it's taking forever (using 60 grit aluminum oxide sandpaper) with an excenter sander. I'll paint it with an anti-corrosion primer once the material is ready. I'm aligned towards removing it but perhaps my method is not the most optimal...
Looks like mill scale. It's normally removed prior to riveting, welding and painting. It is metal oxide but it's a pretty good rust barrier in the short term. Painting over mill scale works well... For awhile... But when it fails, the mill scale turns against you; being moist and trapped under paint, it rusts progressively under the paint, making ever larger blisters with heavy rust under them.
Knock it off prior to applying a good metal primer and paint. Absolute ideal is grit (”sand") blast to SP10 near white metal, then a mil-spec 2-part epoxy strontium chromate primer and appropriate topcoat. That can last 50 years, so it's what you use if you're NASA. A weaker surface prep will significantly reduce performance. A weaker primer will reduce performance somewhat.
I use a wire cup brush with a small angle grinder to remove the slag a orbital sander also works quite well with a smother finish. And even a belt sander works if you don't mind a "grain to the metal"