On the contrary, that's very uniquely and peculiarly human stupidity, possibly caused by the fact that our brains take so long to fully mature. In other species, competing for mates (just like territory) is typically highly ritualized exactly because getting seriously hurt is the opposite of adaptive.
Most of every species gets pretty insane over mates. Evolution is about spreading your genes, not about prolonging your life. Obviously the latter is often useful to achieve the former, but not always. There are even numerous examples, such as black widows and bees, where death is even a part of procreation.
And I think the exceptions are often found to not really be exceptions. For instance chimps were once seen and framed, most famously by Jane Goodall, as peaceful animals who only engaged in violence when pushed to the extreme by some outside force. And in looking up info about bonobos I'm somewhat unsurprised to find that recent observations [1] are rather contrary to their reputation as the same sort of peaceful kumbaya type.
[1] - https://www.science.org/content/article/bonobos-hippie-chimp...
Humans dying to impress a mate are super rare in reality. And even among humans dying to impress ... it is more likely to happen in male only groups where men try to impress and dominate other men.
Maybe google "Terminal Investment"
I feel that rituals of this nature work because they are backed implicitly by the threat of violence, which must be actualized from time to time in order for the ritual to hold force. Just like in human cultures.