Everything we know about the Qun says that an individual has no rights, and that happiness comes from doing what you're told. Why would it matter to them? It's not a matter of efficiency, a cisgendered female never gets assigned by the Qun to a man's role outside of a disaster situation, no matter how good she would be at the role. But the Qun is sensitive enough of a society to analyze and respect the fact that that same individual with a women's body may have the neurobiology of a man?
I don't see it.
You still haven't answered the crucial question: What makes you think that the Qunari view biological sex and gender as the same thing? What have you seen in lore that suggests this? Isn't this coming from outside the game itself, from a current-day, common view of how gender works (that then must be reconciled with "modern society" PC education to show that we should be sensitive to other views, but only because we had such a particular view in the first place - a particular view that does not need to be developed, is not true in every society in human history IRL, and certainly doesn't have to be true to the Qunari).
I'm not talking about PC sensitivity. Why can't they view someone as innately a particular gender based on a variety of factors? Since they look so intently for where someone is best used? The whole notion of gender roles under the Qun is about putting each person to their absolute best use. That's a huge Qun principle mentioned over and over again - Waste nothing, best use, be who you are, nothing more and nothing less.
I underlined a part of your post because I find it incorrect. Sten's happiness may come from doing what he's told - because he is a soldier, and that is part of his nature. But what we actually see in Codex entries and throughout is that the Qunari happiness comes from being who you are, from recognizing and accepting your true nature and place in society under the Qun. This means playing your role, yes, but it should be a role that you are placed in not simply because you are "told" or it is needed but because it suits you perfectly. ("Perfectly" is likely hard to do for everyone. That is merely the ideal, I'm sure.) Those two concepts may not seem different, but I think they are.
Now the Qunari do not believe that all people are essentially good at knowing what they are, and thus it does not have people place themselves, because that would lead to scheming and such. So, no it's not about choice. Because they don't think people are good at choosing, and they want what's best and everyone in the suitable role. Now, practically, maybe the Qunari do re-educate people to keep them doing as-told sometimes. But I don't believe that's the idealistic goal according to their theocratic society. I believe the goal is to keep them in the role that suits them. Now, from our perspective it's all "You didn't pick your job?" but Bull addresses this perfectly. No, he didn't pick his job. But it was arrived at based on preferences and inclinations that he truly had. He wasn't just placed in it because someone needed to fill a quota. It suited his true nature.
It factors into the understanding that you don't actually get to choose your role. Your role is chosen for you. If you don't like it, tough luck. THAT is something we do, in fact, know about Qunari society.
The counter to this fact by people working with just as little information assumes the Tamassrans can catch all the transgendered children before the age of 12 (which is when roles are assigned) and assign them their appropriate gender, and that the transgendered person doesn't actually get to choose that either.
1.) You've said this "Age of 12" thing a few time, as have others. I cannot find this in any Codex, in the World of Thedas, or in any game dialogue references. I see it in the Wiki, but it only links to conversations with a dev, and it's a rather cheeky response that includes a comment about a #2 pencil. Am I meant to take that as canon? Why is it not in WoT or any codices then? It still doesn't really change the point - as I don't see why they wouldn't have identified it by then - but I find it hard to believe we have absolute canon on that.
2.) I've never really seen the Qunari view as "tough luck." I can see how it'd be viewed that way when Sten is talking about the people in Ferelden, but in the lands of the Qun, the people are in roles that they are carefully assigned. They're not just assigned haphazardly. There is some basis in need, of course, but they seem to take great care in breeding what they need, raising what they need, and identifying where people fit in. It's not "This is what we need - tough luck." It's more like "This is what you are, this is what you can be best at and best serve the Qun as, and why would you want any different?" I see no reason to believe someone like Krem wouldn't best serve the Qun as a man and a warrior.
Assuming that is a realistic scenario (which assumes children in a conformist society aren't compelled to conceal any internal differences where they deviate from their peers.
Why would they be compelled to conceal internal differences at a time where they're specifically being observed for temperament, aptitude, and personality so they can be placed into a role? It seems like they'd be less conformist as children. They would be taught the Qun, to some degree, perhaps, though based on Sten, it suggests that they are actually taught parts of the Qun based on their roles later, maybe. But the Qun does not suggest every member should be the same. It suggests that individuality is not as important as the collective, but not that diversity is not an important part of the collective (in fact, even Sten is very clear that every role is vital and diversity is crucial).
Which, well... have you ever met children?), again... why?
Yes. I have met children in many societies, as a teacher in several countries, and not all countries are conformist are equally so, and thus not all children are conformist or equally so. And that's just in our little world. I feel like a lot of people are having trouble not applying the rules of our culture to the Qunari.
Why does a society that responds to atypicality with brainwashing and mind-control drugs not just use the brainwashing and mind-control drugs? Because they don't equate sex and gender? Why wouldn't they when (assuming percentages are the same between Earth and Thedas) for over 99% of their population, Sex would equate to gender?
Why does that percentage matter if you're looking for someone's essential nature very carefully as part of your religious doctrine? I don't think they'd even consider it that way.
Again: Why would they equate sex with gender? I can find no logical reason for arguing this except "Because we do, as a society." (And we do, even if we live in a theoretical world where transgender-ed people are accepted.) And that reason doesn't work.
As to the mind-control drugs, they are to break a rebellious mind, but if being trans is not something that breaks the Qun, then why would it be necessary. Gamek is not used widely (it is applied sparingly, and not as a first resort even by the people who utilize it). And their form of brainwashing is supposedly aligning you with your essential nature, but why is it you believe they cannot accept that Krem's essential nature would be masculine?