There is an old saying that a district attorney could get a ham sandwich indicted if he wishes.
When an indictment is issued, it is theoretically subject to being quashed, or voided. The judge is supposed to quash indictments that have serious flaws such as not being clear what the alleged illegal action is or being based on faulty law. If the defense has no idea what the actual crime being charge is, there is no way to mount a defense. The attack could be anything! This is very important because if the judge allows the faulty indictments to go to trial, no such trial could be fair. Improper indictments are supposed to be quashed (squashed) like the cockroaches they are to protect the rule of law and our society. This is what judges are paid for and it is their duty. This should not be ethically challenging for them.
And yet, for many judges, it is. Many judges take a political approach. Instead of quashing an obviously defective indictment, they let it go through in an effort the please a powerful local district attorney or connected power brokers. Accordingly, they preside over unfair trials and innocent people are found guilty.