The hero here can't be simply understood as a "hero". Heroes here refer to great people, but they are not all heroes (and villains in history). The meaning of this sentence should be that history is the stage for great men, and small people are doomed to be submerged in the long river of history, while those great men shine forever like stars in the sky. If history books record trivial people and events that are insignificant to historical development, then it is of little value to record such history. Therefore, the history without great people and events is doomed to be boring, and recording such history makes history lose the significance of providing reference for future generations.