@rastinza @RickiTarr Sorry for the delay. Work interferes with social media. Hahaha.
True, I gave a brief series of comments, knowing that most people in my circle already know about these things. I wasn't writing a tutorial.
I would hope that most people these days understand the basic concepts of human sexuality. It's not simple, it's extremely complex. Science is still a long way from understanding all the complexities. It will be a long time yet, if ever, that we understand all of it.
At the fundamental level there's male and female, and one might assume the two are automatically attracted to one another. But this is not the case. We know this from observation for thousands of years. Then there's intersex, which I'll ignore here.
There's genetics. Female and male are XX and XY, right? But no, there are many other variations in chromosomes.
Then there are complexities of brain development that we don't understand. The chemistry in the womb affects the fetus in ways we don't understand that result in effects after birth.
One of my grandkids is trans. She's an adult now. She was born with female hardware between her legs but from age 3 or before she knew she was male. Her brain is masculine but her hardware is female and this created all kinds of problems because her siblings, all male, didn't understand.
Here's a concise article that touches on the important parts: https://www.psychologytoday.com/us/blog/gender-science/201701/three-gender-myths-almost-everyone-believes-shouldn-t
When it comes to answering the question of "why", the shortest answer is "because it works". As living creatures, our most important function is reproduction -- passing our genes on to the next generation for further adaptation. From Nature's point of view, this is our ONLY function. All the other stuff, like our big brains, is decoration and came about because it enables us to reproduce better.
Nature / evolution / adaptation is very effective at keeping what works and eliminating what doesn't work. You can depend on this. Nature has had 150 million years to tinker with mammals and find what works and what doesn't. We are mammals, lions are mammals. So, while 2 sexes plus intersex, and 56 identified genders may seem very odd, it works. It works so well that billions of humans are infesting the planet to the point of destruction.
This is all you need to know about why. Science will be investigating the chemistry of why for decades if not much longer, but that won't change what is.