There is a couple of different ways of giving the garment the desired color. Most common and traditional is to color the yarn before weaving the fabric itself. This results a clean and even color in the final product.
Other way is garment dyeing. This means that the garment is made first and the colored. This results in a nice vintage, softer, slightly used look in the garment. This is more and more popular nowadays. Garment dyeing can effect the final measurements of the garment due to the possible shrinking during the washing proses.
Neither of these ways of coloring is better than the other. The way of production merely depends on the desired end product.