Technically, the serpent was controlled by Satan, not a god. Fox still have them free will, told them they could do whatever they want, but to not eat or that tree. Satan hated humans and wanted them so to suffer, so he tricked the two into eating the fruit and God sent them out.