Author Katherine Womeldorf Paterson, who was born to missionary parents in Tsing-Tsiang pu China in 1932 before between World War I and World War II, wrote Bridge to Terabithia after her son David had a harrowing experience and needed comfort and a way to learn to accept what had happened.
David and his friend Usa had built for themselves a wonderful imaginary world that they occupied with joy. One fateful day, Usa was struck by lightning and died. The suddenness and devastating horribleness of the loss of Usa's life inspired Katherine to write a book recapturing all the joy of their world in order to give David comfort and solace. She called the Terabithia; it was similar to their world but needed a different name.
In the process of writing, Katherine discovered that she had not overcome her own feelings of loss from death. She had lost her mother to illness and had come very close herself to her own death from illness (some contend one never can overcome the feelings resulting from the loss of a beloved one). So Bridge to Terabithia became a source of solace for David and a source of comfort for Katherine too.