Neutral and ground wires for ceiling fan wall control
First off, the two neutral wires in the back of the box provide the path back to the source for the current that powers your fan, so they need to stay nutted together or else the fan won't work.

The ground wires should be terminated to the box, though.  Some boxes are functionally grounded (via conduit or cable armor) even if there is no ground wire present, and I can't tell if yours are that way or not from here.