One of the most valuable things I learned in college was a single study I read for psych 101, which I will recreate here. Answer the following three questions, one at a time:
1. You have just taken an important test, and will find out the results in two days. A friend is organizing a very cheap trip to Hawaii in three days. Do you take her up on the offer?
2. You have just passed an important test. A friend is organizing a very cheap trip to Hawaii tomorrow. Do you take her up on the offer?
3. You have just failed an important test. A friend is organizing a very cheap trip to Hawaii tomorrow. Do you take her up on the offer?
Most people answer yes to 2 and 3 but no to 1. Logically, this makes no sense, since the only outcome of question one is question 2 or 3. But the uncertainty of the outcome prevents people from making plans, even if the plan doesn't depend on the uncertain outcome.
Similarly, people will work very hard to avoid an outcome labeled "failure", even if the the consequences of failure aren't that bad. Suppose you've just graduated college and are choosing between starting your own company and working at one of the few corporations that can guarantee long-term, if not lifetime, employment (think Google or Microsoft). Google and Microsoft are sure things. No, you don't know exactly what bonus you'll get next year, but you can count on having a large, stable stream of money. Starting your own company is a huge risk. You're looking at a year or two of absolutely no income even if you succeed- and failure is pretty likely. Why start a company?
As Paul Graham outlines here, you do it for the years after. At least in the tech industry, someone who's started and failed a business is vastly more valuable than someone who spent two years in a cube. And I'm willing to bet this is consistent across the board: security requires a large company, and large companies do not give interesting work to entry level employees- meaning you learn absolutely nothing. Either you take your experience and start another business, or you get hired by someone who's willing to pay a premium for everything you learned.
Sometimes, failure is more than a valuable experience, it's the start of something better. I'm lucky I got fired last year. I'm lucky I didn't get into my first choice of college, since I would never have pursued Computer Science if I had. Now, I'm facing a similar situation: the company I currently contract for has made me a very good offer to go permanent. This place has a lot going for it: I have a lot of autonomy. The work is interesting but not especially taxing. The money would be quite good, if not astronomical. Leaving opens me up to a lot of risk: realistically, I'm not going to get much more money, and may end up with a paycut. The next job might not have such interesting work. God knows how long it will take to get a new job.
Nevertheless, I'm leaving. If I stay, I will always be afraid of leaving, because working here is so easy. And while I learned a hell of lot in my first six months, I don't see the next six being nearly as educational. So I'll take the pay cut and the risk and keep contracting, not only because the behavioral economics are cleaner and I like teasing my perm friends about overtime, but because long-term, that's what's best for my career, even if it involves short term failure.