Unless you're rewiring vehicles (building harnesses) as a business, buying "all" of the different color combos in the different gauges that you might need is WAY impractical and expensive.
Connector shells and terminals are another big consideration. There are thousands of different types and you can't rewire a vehicle without them if connecting to most OEM components.
That's why companies like American Auto Wire, Painless Wiring, etc. exist.
You can wire a basic "hot rod" or pre ~1980 car with black wire of different gauges as necessary and mark the ends with colored sleeving or numbered tags, as has been mentioned. You have to be very meticulous with your labeling, though and connectors/terminals are still an issue if you are using OEM switches, motors, etc. Commercial vehicles were wired like that for many years and may still be.
For minor, or even major repairs, all of the sources previously mentioned are great. I recycle wire from old harnesses for repairs.
