If the cost (in terms of reputation) of printing a paper and subsequently retracting it is lower than the cost of rejecting the paper in the first place, a journal is actually better off printing a dodgy paper and then backtracking later. Ultimately these journals are money-making functions of a business enterprise so they'll usually do what they can to maximise profit rather than quality, apparently even if that hinders the science.