While I agree that adding characters to a work to satisfy some external pressure is a bad idea, I don't think that "justified by the plot" is a very useful way of looking at a character's role in a story. There are plenty of characters who, by the strict needs of the plot, might be considered unnecessary. Tolkien could have folded any number of his characters together without much effect on the plot (would anyone notice Celeborn's absence?), Shakespeare the same (Titus Andronicus hardly needs both Chiron and Demetrius), but would the removal of such "unnecessary" characters enhance the work?I look at it this way. If the character (no matter who) is logical and justified by the plot, then it can be a sexually active transgender sloth, a magician and a wizard. But if a character is squeezed in due to public demands, and his presence is not explained, then he is superfluous and completely unnecessary.
Though if you're arguing that characters of a particular type have to justify themselves then that's a whole other ball game, and not a very happy one. If trans characters have to justify their transness then do gay characters also have to justify their gayness? If that's not what you were saying then I apologise, but it seems like a close argument.