The lesson is: don't give up hope. And there's more to it, we're literally in amazing company when we're rejected--even more so if the number of rejections are multiples of 12.
It was this article that made it painfully clear that even the "greats" were just like you and me--dismal, rejected, dour, sad, and above all hopeful.
Yep, it can happen at any time--the magical "I want to represent you" letter--but there's rejection in the way first. Plow through, dear writers, carry on, keep a stiff upper lip, and storm the beaches. Victory is only the next submission away.