Put simply, being in the right place at the right time, and having connections, can be as important as having the skills and experience.
I always tell my kids, you can try your best and still fail. Sometimes you will succeed without any effort at all. Luck will affect the outcome of anything you do.
But you have to be ready for the luck. You have to work hard to be in a position to take advantage. Hard work can mitigate your failures, and any effort you put into doing your best is never wasted because you’re trying to be the best version of yourself.
That’s why you try. Not because you might win and get wealth and fame and glory. You try because you want to be the person who tries.
See also, honesty, kindness, generosity, forgiveness. These are not things we do to be rewarded. The universe (not to mention other people) is going to let you down more often than not. You should still be honest and kind and generous and forgiving and hardworking because that’s the person you want to be.