The main character might be alive because of the plot of the story. The protagonist was usually the core of the story, the clue and driving force of the story. If the main characters died, the story would lose its vitality and could not continue to develop. Another possible reason was the intention of the novel. The author might want to express a certain thought or emotion, and by keeping the protagonist alive, the author can better express that thought or emotion. The novel wrote that the people were dead while the protagonist lived according to the needs and creative intentions.