I think there is a difference between adoption through the foster system and adoption before the child gets into the foster system. Im not sure about the laws around it, but the judge may have more discretion in the latter case.
My extended family has interacted with this side of the law in my area. From what I can gather, there are two primary goals for everyone involved: get the child to live with their (non-abusive) parent(s) if at all possible, or, failing that, get them into a household that wants them.
Its possible my experience is biased from the fact that it everyone involved was family.