When explaining real data structures to users, companies often use a parallel to the real world to help explain it. An example is the newsstand on an iPhone.
When is it a good idea to do something like this and when isn't it?
It's generally a tradeoff between ease of explanation and future flexibility.
Apple use a bookshelf (or Newsstand) as the metaphor for their Newsstand as people already have a mental model for that in their heads. Hence it is a lot easier for their customers to understand.
The down side of this is that there is no incremental way to change the pattern without confusing customers. It may not be obvious in this case, but lets say that you wanted to fundamentally change the structure to be focused on articles or authors. It would require that people break from their existing real world patterns and think of the structure differently.
If the metaphor weren't a bookshelf / newsstand in the first place (take GoodReader or Papers for example), it may be a little harder for customers to think of the structure at first, but they are then free to express other patterns that don't necessarily match our mental models.
It's because of how our brain works. We have a Mental Model for everything around us and it's always better to make an analogy to the things in the real word because we already know what it is, how it looks and how to use it.
Concerning the second part of your question. I think it's always better to make a parallel, except the cases which could lead user to not properly (or not fully) understand your ideas. The real world is sometimes limited, so not all of the things could be explained by simple analogy, and sometimes you have to break the users Mental model to simply let them understand you or to use your ideas at full power.
Suppose someone doesn't know what a real life newsstand does. It's not really clear to them what the real life pattern means. Now they're really confused.
Another example is floppy discs representing 'Save.' Floppy discs are an outdated technology that we don't use anymore.
Skeuomorphics (real world metaphors on digital displays) are very controversial right now. You could say Apple has a very skeuomorphic style. It sounds like Microsoft trimmed too much detail from Windows 8. The best solution probably lies somewhere in between both extremes. With Steve Jobs gone, Jonathan Ives will likely tone down the existing real world patterns in Apple products.
Skeumorphics are great when the user understands the metaphor. Tabbed navigation on websites look like folder tabs, which is something we're already familiar with.