Hermione returned to Hogwarts for two main reasons. First, she knew she would have to finish school sooner or later. She preferred the soonest option. Second, she didn't want to be lonely at that time. The postwar world didn't look beautiful - it was dirty, full of pain and anger, mixed with some joy.  She also wanted to help Professor McGonagall in rebuilding the splendor of the castle.