Not just art and music, but also science, politics, military warfare, architecture, philosophy, engineering, etc etc. They have been underrepresented in most creative endeavors because the infrastructure made it difficult for them to pursue or excel in such fields. The few who have left a historical mark were usually born of noble blood so they had the time, money and power to do what they wanted.
Take painting for example; in order to become a succesful artist, it isn’t enough to be good. You must make a name for yourself through galleries, contacts, benefactors and so on. The exposure and support is essential, neither of which were available to women. I’m hesistant to place blame on the ugly P word, but there may be some truth to it. The system of education through apprenticeship also made it difficult for a woman to get the same amount of training a man had.
Now that was then, and this is now. But it seems like nothing much has changed. The majority of the “great masters” in 20th century literature, art, architecture, and design are primarily men. Why this is, I don’t know.