History of Corellia
During the exploration era on Corellia, several bands of pirates were known to attack sailing ships carrying precious cargo from exotic countries. Many sailors perished by the swords of these pirates who would board cargo ships by the hundreds. Over time, the pirates made it a habit to clean their swords on the sides of their trousers to boast the number of men they had killed. The longer the row of red stripes on a pirate's pant leg, the more dangerous and experienced he was. Years later,it became a custom to sew in these "blood stripes" to help classify the rank of each pirate. 
.
In more modern times, as Corellia became inter-galactically well know for it's history of swashbucklers, these "blood stripes" were carried on as a tradition in the Navy. Rather than judge rank by the number of stripes, rank was decided by color. For instance, yellow stripes were assigned to Lieutenants and red stripes were assigned to Captains. Many other colors were used. 
.
During the dark times, when the Empire took charge over Corellia, ranks were removed from the standard military uniform and were only used at Naval Academies. Over time, a new generation of pirates emerged, attacking Imperial supply ships of all sorts. Following in the tradition of their predecessors, they donned the classic "blood stripes" on their trousers.