> failure teaches you which mistakes to avoid next time
As a recent grad who has been fired from two jobs, I would be afraid to join a poorly written project because I would worry that I would fail and then be fired.
Learning how to be successful is pretty important and teaches you things you cannot learn from lurching from failure to failure.