Tropes. Those lovely repeated little clichés we see in books, television and media in general over and over again. I won't say all tropes are bad – but when it comes to marginalised people, tropes have a specially unpleasant taste.
It comes down to the single story.
Marginalised people are not portrayed as broadly as dominant people. We don't have the same breadth and depth of stories told about us. Rather than a million paths and possibilities being laid out, the few portrayals that include us (and sheer lack of portrayals is one of the main problems with marginalised tropes. You can't show a plethora of stories if you're not going to show our stories at all) tend to walk down the same paths, follow the same roads, and repeat the same tropes, the same stereotypes and the same tired portrayals. It only hurts more when these tropes are insulting, offensive or are built on real world isms.
The thing is, you can't separate these tropes in any media from the media as a whole. You can't have a portrayal of a marginalised person and pretends it exists in isolation to the tropes and stereotypes that dog all media – in fact all of society.
So you can't have, say, a a gay sex predator who preys on straight men and pretend this is separate from the very damaging societal impressions. For that matter you can't have a gay or bisexual villain and pretend this is separate from the pervasive trope that anything other than straight sexuality = shortcut reference for evil. You can't have the angry violent black criminal and pretend that is somehow separate from both the depictions in the media and societal prejudice and assumptions about real life black people. You can't have the marginalised side-kick who centres their whole life around a dominant protagonist and/or is an expendable character that will die horribly for the greater angst of the protagonist without tapping into the gazillion or more portrayals of exactly that scenario. You cannot cannot CANNOT write in a vacuum. You cannot write outside of these tropes. You can't say “yes I'm doing this, but it's totally not an example of this trope.” Yes. It is. Whether you'd do it with dominant people, whether it is essential to the plot, whether you love those marginalised people so much – it's still a part of that trope.
And yes, sometimes it will happen. You can't avoid these plotlines and characterisations forever and in all media, we know – but know that you ARE furthering these tropes and participating to these tropes. Don't pretend or deny otherwise that this particular example of the trope is somehow special or not really part of it and doesn't further the trope/stereotype/problematic elements. It is. It does.
And on the whole “I'd have done it to a non-marginalised character.” Sorry, doesn't work that way.. Maybe they would have done exactly the same with a straight, white, cis, able-bodied man (though I also think you're giving vast benefit of the doubt there) – but it doesn't have the same impact on a dominant body that it has on a marginalised body.
A straight couple that falls apart because one partner is tragically killed just after they have consummated their love doesn't have nearly the same impact as a gay couple which falls victim to the dreaded gaydeath because ZOMG they dared to be happy! Societal context and this being a trope that happens repeatedly over and over and over again will never make the two the same. That straight couple will be able to fall back on a gazillion portrayals of straight relationships ending happily ever after, fulfilled, healthy, good and safe and will happen in a society that doesn't carry themes of punishment and shame for straight monogamous relationships. That gay couple won't – they'll be one death in a sea of death against a backdrop of shame, punishment and “they've got it coming.”
A man who freezes around violence and sits in a corner whimpering and screaming while the fight goes on will never have the same impact as a woman who, the minute the punches start flying, sits in the corner, screams and doesn't even bother to throw things. Because we have all seen millions upon millions of scenes where the “heroine” cowers in the corner while the Big Strong Mens duke it out. It will be cast against a backdrop of a society that eternally portrays women as weak, fragile victims.
A white person playing the scientist or computer expert will never have the impact of an east Asian person doing the same because of the sheer number of stereotyped roles we have seen casting the cerebral Asian scientist (I'd say academic, but rarely are they cast as, say, history professors or archaeologists or literature students, it's always computers, maths and science) and the sheer LACK of casting in other roles in comparison. The role will be cast, again, against a society with stereotyped assumptions, narrow portrayals and narrower expectations.
A trope for a marginalised person will always have more impact because we don't have the plurality of different stories to make it just one story among many – instead it becomes The Story. The Role we're allowed to play, The Path we always walk down, The End we always have.
So, please, stop and think. Stop with the knee-jerk defence. We're not saying that X media is the worst thing ever and should die in fire. But we're saying it's advancing some extreme tropes – and it IS advancing those tropes with those portrayals. Regardless of the intent of the writer, regardless of what they have done elsewhere, regardless of what the writer felt they were forced into, regardless of what they would have done with non-marginalised people – these tropes are being portrayed, supported and advanced. Accept it and love the media DESPITE that, by all means, but don't dismiss it.