I think fiction can build understanding on certain topics in a way that nonfiction struggles with. It’s the closest approximation of walking a mile in someone else’s shoes.
Additionally, it can entertain us while we get something from it, making us consume more of it.
Fantasy and sci fi can also explore certain ethical dilemmas or concepts with our real-world biases removed. Topics related to politics, religion, etc can be explored more easily in fictional versions than the real ones people are already used to or have opinions about.