What it's scanning for in this case is material it believes to be copyrighted, and restricts features (notably sharing) for content that matches.
Given that copyright law exists, and that Google doesn't like wasting engineering time on legal stuff unless refusing to do it would result in lawsuits, this scanning policy is a fairly low-impact solution that has probably been deemed legally necessary to avoid media company lawsuits. I don't like it, but the alternative is for Google (and Microsoft, and any other cloud storage that allows sharing) to mount an expensive legal effort to try to overturn decades of digital copyright precedent, which is likely to fail.