Fiction works well for teaching a lesson, as in fables. However, presenting facts and opinions in nonfiction might be a better way to present any information. When authors begin to write, they think about what they want the reader to understand or experience.
fiction may be the best genre for storytelling, nonfiction may be the most clear for sharing facts, so both genres have merits.