The Rambam paskens [Shabbos 9/3] that if someone cooks something on Shabbos that doesn't require cooking he is פטור. Rav Yoav Weingarten [חלקת יואב ח"ב חלק ההערות הערה ה] asks that if so, why were the Jews instructed by Moshe to cook the מן before Shabbos [שמות טז כג ברש"י] when the מן could have been eaten raw.
The Shevet Hakehosi [ח"ו סי' קס"ג] answers based on the אגלי טל who explains that if cooking will improve the food, even if it is not absolutely necessary, the Rambam would say that it is אסור. In the case of the מן some preferred it cooked because it improved the taste. That is why Moshe instructed the Jews to cook it before Shabbos.
The Shevet Hakehosi [ח"ו סי' קס"ג] answers based on the אגלי טל who explains that if cooking will improve the food, even if it is not absolutely necessary, the Rambam would say that it is אסור. In the case of the מן some preferred it cooked because it improved the taste. That is why Moshe instructed the Jews to cook it before Shabbos.