Why is purple the color of Lent?
Liturgically speaking violet is the true colour used for Lent and Advent, although many prefer use the word purple.
It is not clear why, how or when purple became a liturgical color for the liturgical season of Lent in the Catholic Church. One thing is for sure. This was not the case in the beginning. Black was the original color designated for Lent, not violet (purple).
Benedict XIV (De Sacro Sacrificio Missæ I, VIII, n. 16) says that up to the fourth century white was the only liturgical colour in use. Other colours were introduced soon afterwards. - Catholic Encyclopedia
For many centuries the West regarded purple as a color reserved for royalty or the very rich.
Purple was a status symbol. In Ancient Rome its use was limited to Emperors, and to a lesser extent, senators, so Tyrian purple also became known as Imperial Purple. - The Liturgical Colour "violaceus" in the Roman Rite.
Liturgically speaking purple (purpura)is the correct term to be use in describing the color for clothing for catholic prelates and violet (violaceus) as the color associated with Lent.
The Latin word purpura (which strictly translates as “purple”), but this is hardly ever mentioned in the Liturgical books or the works of commentators. - The Liturgical Colour "violaceus" in the Roman Rite
As time moved on other liturgical colors were added to the Church's liturgical usage.
In the twelfth century, Pope Innocent III was the first to specify the colours of the vestments that were to be used for the Roman Rite; almost certainly this reflected prevailing custom in Rome, not an invention on his part. Although a separate subject from this article, it is well to remember that it was only towards the end of the 1st Millenium that the question of vestment colour became a significant one. Black was designated for penitential and funeral liturgies, but violaceus was indicated as a substitute for black. Pope Innocent’s treatise De sacro altaris mysterio (Book I, chapter 65, which was written before his election as pope in 1198) seems to be the first indication that violaceus had come to be regarded as a penitential colour for the Roman Rite. - The Liturgical Colour violaceus in the Roman Rite
All we really know is that the color "purple" seemed to creep into the liturgy from the 12th century onwards. But why it took on this symbolic meaning for representing penance remains a mystery. Prelates still don the purple!
The word violaceus used in the ceremonial books of the Roman Rite indicates the colour purple (reddish hues) or violet (bluish hues): the Church does not define the shade violaceus as it applies to sacred vestments. But the Church does define the shade violaceus for the robes of its prelates. Both the reddish purple and the bluish “purple” are colours that have been traditionally used for sacred vestments in the Roman Rite since at least the 12th century. - The Liturgical Colour violaceus in the Roman Rite
Although somewhat mysterious as to why violet replaced black as a penitential color for Lent. One possible reason for this is that it may have come into liturgical usage due to how black fabrics faded:
Fugitive dyes are unstable. Made from pigments that are not light or color fast, they can fade even if they are well taken care of. One of the most famous examples is this black mourning dress worn by Queen Victoria on the day of her accession to the throne:

Queen Victoria’s Privy Council Dress, circa 1837
That’s a black dress?!
Well, not anymore, but it was.
Originally, this dress was a deep, shimmering black, but the fugitive dye has aged poorly. Black dyes have been historically notorious for fading, usually to this rusty brown. Some black dyes also fade to blue or even purple, depending on the dye used. - Dying Dyes: What You See Isn’t Always What Was