I know, I know, my opinion is probably going to come across as a little wishy-washy but I can see all sides in this argument. On one hand, while it's important that the writer know the history of their world, there's know need to dump it all on the poor reader, especially before they've got a reason to care about these characters/world.
But at the same time, you don't want to completely pull the rug out from under the reader. A little rug-pulling is okay, but too much and the reader throws the book against the wall in a rage. Like if they're reading what they think is a straightforward coming-of-age YA story, only to reveal in the middle of it that the heroine's puppy is a magical telepathic puppy from the planet Jupiter...yeah, I think we'd all agree that's too much. You can insert sci-fi/fantasy elements into a story, but there's needs to be buildup. It can't just come way the hell out of nowhere (you have to establish a world where said elements are a possibility) and it can't especially be suddenly revealed as a means of saving the heroine's life. That last part is called Deus Ex Machina and there's a reason it has a negative reputation.
But at the same time, you don't want to completely pull the rug out from under the reader. A little rug-pulling is okay, but too much and the reader throws the book against the wall in a rage. Like if they're reading what they think is a straightforward coming-of-age YA story, only to reveal in the middle of it that the heroine's puppy is a magical telepathic puppy from the planet Jupiter...yeah, I think we'd all agree that's too much. You can insert sci-fi/fantasy elements into a story, but there's needs to be buildup. It can't just come way the hell out of nowhere (you have to establish a world where said elements are a possibility) and it can't especially be suddenly revealed as a means of saving the heroine's life. That last part is called Deus Ex Machina and there's a reason it has a negative reputation.