No, there isn't. A gene just happens to be. If it's beneficial to the animal then the chances are high that it's passed on. OTH if it's detrimental to that particular organism then this organism is less likely to survive and pass it on.
It's trial and error. Whether a gene is good or bad is only kown after it exists and is 'tested' by the environmental conditions.
I do not disagree that a gene has to be beneficial.That is the problem I was pointing at. Not only is it hard to create any kind of working gene, it has to have in addition a beneficial purpose and do something better than what another gene may be already be doing. This increases the odds against evolution occurring by random chance by an even greater extent because a large proportion of functional genes which might have occurred would be discarded. So your statement above really increases the odds against evolution rather than decreasing them.