I believe it was because the brownish pigment used for the paint was very cheap and common. They didn't quite have the range of artificial pigments we have now, and whatever natural pigment (iron oxide maybe??) that was used to get this colour was inexpensive.
By the time steel boxcars came around, brown was pretty traditional.
Passenger cars (the "Varnish") were often painted with brighter colours, or even heavily varnished natural wood. Some roads had actual gold leaf lettering and designs on the corners of the cars.
Refridgerated cars (esp. "billboard" reefers) could also be colourful.
Boxcars & other freight cars could be any colour too, but I believe the brown was preffered for the cost.
As an aside, iron components (like trucks, wheels, brake gear etc.) I believe were usually painted black in the early days because of the paint used to rust proof it (I think I read it may have contained some amount of pitch as a rust-proofing agent).