How has a failure, or apparent failure, set you up for later success?

Long term failure to find a job made me save money and invest once I secured a steady income. The success should come by 2033. By that time I shall draw 4% from my portfolio annually and have a stream of passive income for better or worse.