The caveat is helpful because there's a lot in life that you can't control. Luck plays a part in both success and failure. If you believe that your failures are solely your fault you will be unreasonably discouraged . If you believe your successes are due to you and you alone you'll turn into a jerk.
It's true that your attitude and behaviors matter. Competence is usually rewarded, and you should act in accordance with that truth. But it's not absolute. Life is not a meritocracy (whatever that really means).