Stanley is correct that bravery was needed in order to take down It. In order to defeat Pennywise, the remaining members of the group confront the clown and mock him, making him appear small and weak. However, that doesn't really explain why Stanley needed to die in order for the rest of the group to defeat It, as opposed to just not show up. It also doesn't reveal how Stanley knew his only options were to stand up to It with his friends, or die alone. As far as has been established by the film, It would not have found Stanley in his home outside of Derry: It simply doesn't have power that far away from the sewer.