Here's a prototypical example where the facts are good but the law is bad.
The question is whether Mario Sanchez is a person of "good moral character". You can read Judge Pregerson's dissent in its entirety -- and it's very good on this point -- to get a complete sense of why Mr. Sanchez might be precisely such a person. But here's a typical sentence therein: "How can we possibly say members of Congress intended that a man who married his hometown sweetheart, brought her here for a better life, worked hard for twenty-one years to provide for his three children, bought a home, attended church regularly, and cared for his ailing father is a man of bad moral character?"
The problem for Mr. Sanchez is that the facts are good for him but the law is very, very bad. So much so that he only gets a single vote -- Judge Pregerson's -- in the en banc decision. Mr. Sanchez helped his wife enter the country. So we're booting you out notwithstanding all the equities in your favor.
This is not a case of good facts making bad law. It's instead of case of bad law overwhelming good facts. Which happens just as often -- if not more -- than the former.