User blog comment:Mrlmm0605/Let's Talk Bleach! Part 1 - The Shinigami/@comment-26091912-20150531114355

The Gotei 13 are a military organization; therefore it would (at least it should) adhere to a military law equivalent to say the Uniform Code of Military Justice. Assuming it has a code of conduct, the purpose of each member of the Gotei would be to 'fight and die for the sake of the court' (i.e. do what it takes to maintain the balance, and uphold universal justice).

That would be the established dogma for all Shinigami in the Gotei 13; they don't have the luxury of applying their own personal morals at all times, given the critical nature of their job. The job of all Shinigami is to maintain the influx of souls from the human world and vice-versa. If there's ever a possibility where the status quo were to be comprimised, then you do what it takes to prevent that from happening, even if it goes against your own morals and ethics.

For the Gotei 13, what might seem like injustice in the short term, is actually justice in the long term. What it comes down to is, what must be done out of dire necessity, and what goes against conscience. In the case of the Quincy extermination, that was out of necessity, because the Quincy wouldn't listen to reason. In the case of Rukia's execution, well everyone was duped by Aizen, so we can hardly fault the Shinigami for that.