Cribbing is thought to be genetic because cribbers are more likely to have cribbing offspring. Also, cribbing occurs in some breeds more frequently than in others. For example this behaviour is more common in leaner horses, like Arabians.
But cribbing can as well be learned from other horses. This means cribbing is partly genetic and partly learned.
As already mentioned, cribbing can also develop due to learning or environment. A horse will learn cribbing from other horses and possibly become a habitual cribber as well as begin to associate cribbing with food. This may occur if cribbing is associated with certain feed times or if the horse is cribbing to get attention.
Therefore, although cribbing has genetic components it does not mean that it cannot be prevented or reduced by changing the environment or diet of cribbing horses.