Companies can get lucky and look successful for a while, but they crash and burn just as fast.
YC only succeeds if they invest in the home-run companies. The lucky, flash-in-the-pan companies don't provide the returns YC needs.
YC's publicly-stated strategy from the very beginning has been to cast an extremely wide net, knowing that most wouldn't amount to much but the outliers would return enough to deliver a huge outcome overall.
And a key part of their strategy has been to be so founder-friendly that most of the promising startups would want to be part of their program.
If you look at the number of "unicorns" that have emerged since 2005, it's remarkable how many went through YC.
It's also notable that basically none of the spectacular boom-then-busts went through YC.
That's not "dumb luck", it's a well-thought-out strategy that has been proven to work extremely well over a decade-and-a-half.