Entertainment/enjoyment
One of the main purposes to the Avatar movie and Divergent novel being created was simply for entertainment. Some movies and books are made strictly for informative purposes only, however these were composed to entertain and for something to pass time.
Career
Another reason for the Avatar movie and Divergent novel being created was due to the many people in the writing and directing buisinesses who needed to be continuously working on new and original pieces to earn a living. Without all of the movies James Cameron directed in his lifetime, he wouldn't have anywhere near as much money as he currently has today.
Message
Another reason why the movie Avatar and the novel, Divergent was created, was because the composers wanted to portray different messages and show meaning. Most movies and books aren't just created for fun, but for a reason.