tl;dr Bigotry exists, a lot of people in the CAF are bigots, and thus that bigotry changes the way that certain people are "dealt with".
The Canadian Armed Forces is a microcosm of Canadian Society, which is by and large racist. It in particular was set up by white Christian men, to suit white Christian men.
Efforts made to eradicate even people who are actively members of hate groups are inadequate, let alone those people who simply hold bigoted views and allow those views to taint their decision making processes, all of which will A) disadvantage members who "don't fit the mold", while at the same time serving to aid people who do "fit in".
Likewise sexual assaults or harassments, which in the CAF are predominately targeting women, are poorly investigated, leading many victims to leave due to the lack of support, or to be revictimized when they do report and instead the system as a whole moves to target them and smear their reputation, rather than the person who actually deserves it (for this, see the 2nd most recent article by he-who-shall-not-be-named-on-this-site-because-the-moderators-couldn't-be-bothered-to-remove-defamatory-comments). Likewise a similar approach is often taken against folks who try to support victims, as we saw with LCdr Trotter.