Google penalises duplicate content for two reasons:
- Duplicate content (across different domains) suggests that you don't own the content, or that you copied the content
- Duplicate content has a negative effect on the user experience
Having both www and non-www version of a website won't result in a penalty, Google will likely just choose one version to show and demote the other. This is to improve user experience where access to both versions adds no value.
A more subjective reason that SEOs advise against duplicate content is the message that is sends to Google. Google is trying to decipher the specific order or relevance for every website against every search phrase. One way that it makes this decision is by looking at how well optimised (see Why is loading speed of a website important for SEO?) and cared-for a site is. Having duplicate content tells Google that your website is not especially looked after and therefore may actually be less authoritative - of course with most things SEO-related this is just speculation, although there have been a number of tests to support this theory.
So to clarify:
- Minor duplicate content is not bad if it doesn't effect the user experience
- You won't receive a 'penalty' due to a lack of a 301 redirect between
www and non-www