Shrouded in the mysts of time somewhere one of our hominid ancestors is beating up his cousin for mating rights to his sister while a slightly more primitive Joe Rogan commentates. Martial arts have a long history. We are a highly violent species and our methodologies for exacting bloodshed both have changed and evolved over hundreds of thousands of years along with changes in our physical form, population density, and technology. Just as with all technologies primitive man used a tool or a method and improved upon it over time. Our tool in this case is quite complex and involves strategies and technologies for military and civilian fighting, although there are periods in our history where those lines were admittedly more blurred.
Anyone who is enacting violence could be said to be engaging in a martial activity whether civilian, police, or military. The art aspect comes when one begins training. How and to whom the training is applied is largely irrelevant. You could be training civilians, regular soldiers, militias, police, or sport fighters. The "art" part comes from the knowledge of what you are doing, in this case violence, and the aspect of attempting to better your ability in doing it.
The training of martial arts is clearly quite different between many systems now but it may not have always been so diverse. After all there are a high number of commonalities between various weapon arts. Using dao is not significantly different to using a sabre just as using a katana is not dissimilar to using a longsword. At the core they share certain fundamental principles. Now there are many people very skilled in weapons and the historical uses of such weapons but the real point here is that weapons were used regularly in combat and could often be traned resistively with relative safety. As such you tend to find these commonalities. Moving back to unarmed and unarmoured fighting you tend to find similar commonalities in wrestling. The expression does tend to look different as a result of specific rules and occasionally clothing, as in judo and shuai jiao, but by and large wrestling is wrestling is wrestling. Take for example pehlwani/kushti from South Asia. Again the key commonalities of safe, resistive training, and likely regular use in warfare, lead to a common expression of combat principles.
And now the most historically diverse expression of martial arts: Pugilism. That is the attempt to hammer your opponent into defeat using your body as a bludgeon. The various striking arts have their own ways of training. From chi sao and push hands, to preset drills and two-man forms, to slap boxing and kumite with hand strikes to only the body; each art has had to work around the irrevocable fact that they cannot strike each other on a regular basis without incurring significant damge. Fractures, cuts, and concussions are all very real concerns for our progenitors in the art of butt-kickery.
Enter the boxing glove and behold its squishy padded glory.
It may be surprising to many that this technological development did not come earlier in pugilism's history. After all we have evidence humanity has been leather working since at least around 10,000 BC. Since then we developed all manner of implements for skewering and bashing other bipedal hominids to death. Over thousands of years we also developed some pretty good protective equipment as most groups and individuals don't want to die, and generals want their troops to win and with as few casualties as possible. Given that wrestling has played a more significant role than striking in most weapon arts the need for training striking for military application of pugilism has never been particularly high. As previously empty handed combat was well down on the force continuum, weapons and grappling have had much higher priority. So on the question of why boxing gloves and headgear didn't get developed sooner you're left with a few fairly reasonable options:
Training - Regular fighting forces have not been the norm throughout human history. For any random member of the tribe who could have to defend himself or his resources, and peasant farmer who could be called up into a militia, fighting was not a priority. Our military weapons such as the bow and spear evolved from hunting implements or other common tools. In the ancient world the priority was survival and far more time and energy was devoted to things like agriculture and construction than organized regular warfare. Wrestling was a sport and communal activity which could be enjoyed at festivals and used as physical education and an expression of masculinity.
Injury - While protective equipment lessens the dangers associated with striking it does not eliminate them entirely. Wrestling is still far safer. Even with 400 years since the Marquess of Queensbury Rules padding a fist has not evolved significantly and short term or long term injury was a valid concern. It could endanger your livelihood and, with no advanced medical care, your life.
Cost - Before mass production most goods were more expensive. Simple objects we now take for granted took a greater percentage of an individual's earnings than they do now. The time and skill necessary were a large investment with little comparative return.
Though they and other traditional western arts may have been pushed out of the spotlight in the era of kung fu flicks and karate, boxers have been arguably the best in pure hand striking for hundreds of years. I would chalk this up the Marquess of Queensbury Rules mandating the use of boxing gloves in bouts. Not only did it reduce the number of facial fractures and cuts in regular bouts but it provided an unparalled avenue for resistive training. That you could hit your partner with significant force was a technological leap forward in training which was echoed in the ring by the skill of the men who fought and trained with pillowed punches. Evolution in other competitive arts like Muay Thai have come about due to what we would now consider a simple technology in mass produced padding. With a slew of different protective equipment this has changed the way we train striking arts and subsequently the way we fight using them.