I recently found out about this post, where the athour says placing this type of redirect ensures that Google only sees one version of your site, thous avoiding PR splitting between 2 versiones of the same page.
SitePoint Blogs » WWW or NO-WWW?