There can be different factors involved.
With licensed games, for example, sometimes they're just looking for a quick cash-in. Other times, they don't actually have any good ideas for a game but they're being required to make one anyway because of a related release, often with a strict deadline and shorted development period. With E.T., I think they had less than two months to develop the game, with obvious results.
With original IP, sometimes they think they're going to make a good game but it just doesn't turn out as well as planned and there is a need to recoup as much as possible. After a certain point, it might be less expensive to release a bad product than to cancel. There are also IP which will sell regardless of quality, simply because it's from a particular brand.








