The most important gain for the employer is the fact that the employee trains himself on new technologies, for free, in his own spare time.
The risk would be that the employee might leave if his side project is a success. With around 4% rate of high success in the startup world, the risk of leaving is quite small.