"what went wrong"? I don't like the phrasing. People leaving and wanting to do something else is perfectly normal. There is nothing wrong about it. It's just a fact of life. The best way to deal with it (apart from offering a better compensation) is to wish them all the best and say they are always welcome back.