I'm not just talking about games that sell poorly, though. There are developers that cancel more than half of all projects, and it's often in the later stages of development that they pull the plug. I was speaking with someone who worked for either Gantz or Gameloft, I don't recall which, who told me that he had been working there for several years and not a single project he has worked on has made it to market.
That isn't the fault of piracy or used game sales, it's the result of fickle and/or negligent management.
If a company can't make money selling a plastic disc for over a hundred times what it costs to make, then they have only themselves to blame.