I think the epilogue, as well as finishing off a few loose ends, was written to reassure the kids who read it that all was well. It's the "Happy Ever After" bit. A lot of younger readers will have been upset by the various deaths and stuff and knowing that Harry, Ginny, Ron and Hermione are fine and happy will be comforting for them.
_________________________
It is better to open your eyes and say you do not understand, than to close your eyes and say you do not believe.