I've been rejected from numerous job attempts and I learned a lot from the majority of them. Whether it was the lack of fundamentals on data structures and (sometimes) stupid algorithmic interview questions, or a CTO with whom I totally clicked but the founders just didn't get me, or "ew, I'd kill myself if I had to work in this office", most of them were learning opportunities.