Before the war volunteer militia companies (as opposed to the statutory militia) were allowed to select their own uniform designs, which accounts for the wide variety of colors and designs. Members and patrons of these companies (for which they were sometimes named) provided the funds for these. The state usually issued arms and equipment; everything else came from private sources.
As you know, wear and tear on fabric under normal field conditions is significant. Once hostilities began and volunteer companies entered actual military service, the ability to provide or replace unusual or distinct uniforms and headgear was sharply reduced. Hard pressed to provide arms and equipment for soldiers, the new Confederate government could not possibly supply special uniforms for hundreds of the older volunteer companies.
Depot quartermasters issued standard uniform jackets, shirts, pants and shoes to each Confederate division and brigade. They had nothing else to offer. Individual soldiers acquired clothing from home as well as captured Federal stores to suit their own needs. Long before Lee's army crossed the Maryland line into Pennsylvania in June 1863, the ability to distinguish one unit from another in the Army of Northern Virginia had disappeared.