I strongly oppose this view. Understanding how refraction works in no way diminishes the beauty of a rainbow. I would say it even enhances it's glory. Similarly, understanding the underpinnings of fiction does not ruin it at all, and if anything, enhances it.
This is just my personal view, of course, and to each his own. But I personally can say that having seen the inner clockwork of fiction, I would not go back and have it any other way. (And many other agree with me: There are many internet communities devoted to understanding and explaining literature's inner workings, the most well known of which is tvtropes. I heartily recommend it to anyone interested in plumbing the full depth of literature's workings.)