Paul was writing to the church at Corinith that was beset with many problems and was known as "sin city." The town was dominated by the temple of Aphrodite, the goddess of love which was built on the heights of the acropolis. There were thousands of temple prostitutes and the city was a by-word for excess and sexual licence. There was even a word for it: to 'Corinthianize.'
The heads of the temple prostitutes were shaved, so a full head of hair was a glory to the person who possessed it. Not only was it a glory to the lady herself, but it was a glory to her husband as well and would bring honour to him.
Another thing the rich women did was to show off their wealth by wearing their jewellery in their hair, and Paul was telling them to keep their heard covered in church so that the poor could not be distinguished from the rich. In this way thanks to the wearing of hats, or even a towel or shawl, all would be equal in the sight of God. The Bible tells us to be modest in all things and both Peter and Timothy address this in 1 Peter 3 and 1 Timothy 2 v8 see below:
“You should not use outward aids to make yourselves beautiful, such as the way you fix your hair, or the jewellery you put on, or the dresses you wear. Instead, your beauty should consist of your true inner self, the ageless beauty of a gentle and quiet spirit, which is of the greatest value in God's sight. For the devout women of the past who placed their hope in God used to make themselves beautiful by submitting themselves to their husbands.” (1 Peter)
In like manner also, that women adorn themselves in modest apparel, with shamefacedness and sobriety; not with broided hair, or gold, or pearls, or costly array; 1Ti 2:9 KJV
They both put their finger on it when they spoke about our actions and our "true inner self, the ageless beauty of a gentle and quiet spirit", because from scripture, Jesus said, "by their fruits ye shall know them."
What we do and say reflects what is in our heart while ornamentation is only outward show and the things of this world rot and rust away.
Briefly, Paul was addressing a problem in the church that existed in his day, and he would be horrified if he knew the controversy it causes today.