Before guns it was the elite that were trained since boyhood in numerous martial arts that typically prevailed.
You didn't get to choose to be one of them either, if you were born a peasant you typically died a peasant, forced to remain ignorant on most topics including weapon use and tactics your entire life.
Becoming a Knight for example in the medieval times often began with being a 'Page' for about 7 years. At about Age 14 you could become a 'Squire', and if lucky maybe a 'Knight' sometime after 21.
It included a lot of education, and was far more extensive than romantic fiction today.
People didn't fight by grabbing swords and running at each other to engage in 1v1 fights or mass battle like almost all medieval fights in movies.
The untrained might try, but were quickly destroyed on the field. Willpower and testosterone didn't overcome methodical and extensive training.
No battle was quite tedious and formal, with numerous formations, tactics, counter tactics. It would make for boring cinematics, and not highlight single men who are the heros of the story like the fights of Hollywood.
Real knights also saw more use in putting down the occasional peasant revolt than in fighting foreigners. Knights were very valuable taking such a long time to train, and they would recruit less valuable and less skilled soldiers to have killed fighting in foreign conflicts, with some occasional exceptions (a major one being the religiously motivated crusades.) They were essentially the instrument of tyranny.
Education was similarly monopolized, the aristocrats were smarter than the peasants because they had all the time in the world to learn anything and could access and travel to sources of literature and education while the peasant could not. Peasants couldn't use the libraries that existed.
So you had the intelligent aristocrats, and the knights trained since boyhood, living off the majority of society that were kept ignorant peasants and had no hope or way to change their situation.
Romantic fiction of medieval times also focuses on the lifestyles of what were a very small percent of the population. Most of society were forced into dull drudgery of hard labor with little perks their entire lives, unless called upon to die in mandatory service in foreign conflict. (A tactic even exploited to kill off young men of fighting age in rebellious territories of a kingdom and leave the territory unable to be much threat.)
Medieval times really sucked, except for the tiny percentage of the population that lived well at the expense of the toiling peasants. For every knight/aristocrat living decent and being educated while lavishly consuming the products of labor in quantities much larger than any peasant and contributing none you had to have many peasants living low quality lifestyles receiving little for their life's work.
Swords were also not really used much in real warfare against formal opponents by most societies like the movies and fantasy portray, they were the side arm of the day.
The real weapon was often some sort of pole/spear type weapon that did the majority of the killing and had great advantage over those armed merely with swords.
One might fall back on their sword, like one would a sidearm, but only if their superior weapon was not available or damaged.
However when dispatching a peasant from horseback, or striking them down after an insult, swords were often used. This was a right even reserved by the samurai under law, to kill any peasant that disrespected them. Samurai on horseback trample your kid crossing the street and you say something disrespectful? You're dead.
The gun played a huge role in bringing down tyranny, making a common man with minimal training nearly as deadly as the formal professional trained since they were a boy. Which made the Knight/Samurai obsolete and too expensive to justify.
Just as the printing press removed the monopoly on access to education, and allowed 'rogue' presses to distribute information.
The governments sought to control arms, implement gun control, seek out those pesky rogue printing presses and their books, etc to compensate and retain the control they had for centuries. But that proved much more difficult than the previous situation which in turn lead to many rights and freedoms for the masses over time.
As for the ugliness of war itself? War was far deadlier for those involved before firearms.
Here is some examples I posted in another thread.
The Ilad and Aeneid figures are from sword and spear times.
Notice nearly 9 out of 10 people injured in war died back then fighting other organized forces. Now consider you might inflict lethal wounds on an opponent and still get some in return, or from the guy in formation next to him. Hacking and stabbing at eachother at close range is gruesome, and it's not the movies where the first person stabbed goes down defeated.
Individuals can take horrific wounds and still hack or stab back themselves, especially when mentally prepared to do so beforehand as many soldiers of the time period trained for. There was even units that were expected to die and suffer lethal wounds almost any time they engaged a formal enemy in combat but deliver lethal wounds as well. Take a look at the old Berserkers for such an example. They would charge in with such ferocity and indifference to wounds (but more organized than in the movies) that they always exacted a toll but almost always died as well. They had a whole subculture of training to honorably die in battle while inflicting maximum damage on enemy forces while dying (like say a modern suicide bomber.)
Any knife fighter will tell you that in a knife fight you need to expect to get cut. Two trained knife fighters will certainly get a few cuts and stabs on the other before one defeats the other. Now imagine when that was the way of war and any deep cut or stab by a sword or spear was likely to be eventually be fatal.