You can't know the game is a piece of crap until it goes into testing probably, which is near the end process. It's hard to know your game is bad in the pre-production phase, because that's when hundreds of good ideas are thrown around. Once you've invested too much, you have to release a game. Just look at Tales of Symphonia. I'm sure Namco wanted to just throw it out after testing, but they had to recoup the loss of resources, so they decided to release it.
I know that both Resident Evil 2 and 4 were both scrapped completely a good portion of the way through and were forced to basically start over from scratch. There's still Elza Walker Resident Evil 1.5 videos on Youtube to show what could have been and thankfully never was.








