I'll paraphrase a quote a friend attributed to Deming: "When a company fires someone, you have to ask whether their hiring process is broken or did they make them that way?"
That is, either they didn't properly assess you or they changed the situation into one where you were setup to fail.