Righteous people confidently expect that good things will happen to them, and that causes them to be happy/joyful; but when wicked people confidently expect something good to happen, it does not happen.