The question should be: Why isn’t all sugar brown? Sugar is dark colored when it is extracted from the sugar cane plant.
Most sugar appears white because it is filtered in such a way as to remove the brown coloring. Brown sugar is prepared so that its crystals are allowed to retain a thin coating of dark sugar syrup.
This is not entirely true. Brown sugar is brown because of the addtion of cane molasses. Which comes from an entirely different cane. My folks used to make molasses here in Missouri.