Genes themselves aren't sentient or self aware, they themselves don't want anything, they can't be described as feeling purpose or direction.
DNA is an inert chemical chain encoded with linear and non linear data which is acted upon and maintained by nano machines manufactured with the instructions it contains, which do you think came first?