Hey, Legolas is a prince and hardly just some average elf. You shouldn’t expect all the other elves to perform to the same standard.
You can tell it’s a work of fiction because most of the royalty in LOTR have some outstanding qualities and aren’t all inbred.
In medieval and antique Europe, royalty and nobility in general was often expected to fight on the battlefield. It was only in early modern times when gunpowder and pike squares started making cavalry charges obsolete that this fundamentally changed.