An interaction of genetics and environment is not random. Environmental conditions drive and shape biological adaption in relation to the niche, predator, prey, plants, etc, that any given organism occupies.