Where Science Fiction is the writing of stories derived from some form of extrapolation from the laws and theory of science, there is a subgenre of books which take well-established settings and worlds and take a documentarian, analytical view of how that setting fits into, illustrates, or contrasts with the "real world".
There are many reasons for this. It'd be nice to say that a lot are written because the author is using the known milieu and expanding the understanding of why the stories speak so strongly to the reader, for great stories do not exist in a vacuum. We are hopefully led to a deeper appreciation of both the stories and the world around us.
However, there is more than ample evidence to make the argument that a lot of it is either merchandising, trying to milk a franchise, or a Fan Wank gone horribly and publicly wrong.
Note that while a lot of the books are in fact science-oriented, this is not the only topic.
Contrast Literary Work of Magic, when a Real Life fictional work has an agenda in the universe of another. Compare Review, the act of evaluating —through storytelling lenses— a fictional work in a public manner.
- The Physics of Superheroes by Dr. James Kakalios, who has also given physics advice to comic writers. The book is notorious in the fan community for proving that it was the whiplash from Spider-Man's web line that killed Gwen Stacy.
- The Gospel According to Peanuts.
- The Parables of Peanuts.
Films — Live-Action
- Discworld: Averted in The Science of Discworld series, where the chapters alternate between "story" and "science", and illuminate each other. In the story chapters, the wizards of Unseen University study a "Roundworld" they created that lacks magic and impossibly runs without narrative causality - just scientific laws. The science chapters explain what's happening in the story - how scientists work, the formation of Earth, and so forth, serious explanations of the real science that the wizards have encountered. The writers mention this trope in the introduction and say they are not doing it. A more accurate name for the series would be "The Science of Roundworld" (i.e., our world), but you know how it is...
- The Enemy Papers: The novel [expanded Enemy Mine book by Longyear] are supplemented with excerpt of The Talman (Drac "bible") and Drac for Travelers (sort of phrase-book).
- Harry Potter:
- Harry Potter and History.
- The Science of Harry Potter.
- His Dark Materials: The Science of His Dark Materials
- Winnie the Pooh:
- The Tao of Pooh and the companion The Te of Piglet.
- Winnie the Pooh on Management and its follow-ups Winnie the Pooh on Problem Solving and Winnie the Pooh on Success.
- Star Trek:
- The franchise has various Technical Manuals for this reason.
- How William Shatner Changed the World.
- I'm Working On That, named after Stephen Hawking's comment on a tour of Star Trek sets, referring to the warp core.
- The Physics of Star Trek.
- The Religions of Star Trek.
- The Simpsons: What's Science Ever Done for Us? looks at the series through a scientific lens.
- MetaBallStudios: The channel is devoted to quantifying physical aspects of fictional stuff such as their size and speed. The creator also attempts to measure the time duration of certain In-Universe events.
- The "Because Science" video series uses actual science to answer questions about various works of fiction.
- Open Court's Popular Culture and Philosophy® series: including Star Wars, Transformers, superheroes, and their book of the undead.
- Philosophy and Science Fiction is an introductory philosophy textbook using over a dozen stories from Science Fiction.
- Physics of the Impossible by Michio Kaku, also the television series "Sci-fi Science: Physics of the Impossible''
- The Science of Superheroes: It differs from most of the others in this category in that it is a science textbook first, superhero fan material second.
- Lila Gaela: Some of her writing advice entries (as well as those collected from her followers) detail real-life topics in regard to how they can be used in literature. The topics include Peruvian Pre-Columbian Civilizations and child psychology.