GP has operators operating on a multidimensional input. GP builds simple programs, GP is good enough for the task, you could discover the same function that SGD discovers, but unfortunately in practice they are too slow, because they are blind to the landscape of the function.