I often hear that a writer should not write something that is not tightly linked to the plot. "If you can narrate it without it, drop it from your story" - that's what I see.

However, is it really bad to include something just for fun or just because it conveys the rare (exotic and interesing) idea? Should I not include such a thing in the novel?

I'm guessing without these things the novel might just become a non-artistic book, like the scientific (not a popular science) one, but just the one that describes something unreal. Unscientific science.

Thus I guess the answer is not positive. But how much should a writer deflect from the plot? Is it OK to devote a whole chapter (a few pages) or a couple to it? Is it OK to have an unnecessary frame story (within given setting) just because the story itself might be cool (within the context of a novel)?