Truth is Oda always wanted the whole there good and bad side to each group and that just like real life.
So that was always going to happen .
It would've been better if he actually kept to that sort of moral ambiguity theme consistent, but the minute he introduced stuff like the Just 11 Jurymen and most notably the celestial dragons, which he made over the top evil, just kinda tossed any moral ambiguity out the window. With the Just 11 Jurymen I can sort of just dismiss it as Ennies Lobby trials just being ceremonial since being sent there is already a death sentence and Spandam was corrupt as heck and just feels like standard government unfairness. But the Celestial Dragons felt like the ultimate red flag since their introduction, much like all of Sabaody.