Why does Doodle die in the end? Why does the narrator leave Doodle behind at the end?

http://www.shmoop.com/scarlet-ibis/william-doodle-armstrong.html