Luck is an important factor for a few reasons.
1. Genetics is a game of luck. The luckier of the bodybuilders have very good genetics, naturally low body fat, naturally large muscles, etc.
2. Not getting injured has at least somewhat to do with luck.
3. Coming in on competition day at your absolute best is very much driven by luck. Sometimes you come in good shape and sometimes you don't. That's just how it works and this happens even to the seasoned professionals.