It has everything to do with marketing, and while you may have an opinion that its a code of conduct, I see a company with a "do no evil yet" blurb yet decides that they want to own everything. That is they try to retain the rights to anything that lands on their server, pictures, emails, etc. They get caught from time to time and re-amend their privacy rules.You are absolutely incorrect. "Don't be evil" has nothing to do with marketing, it is the mantra. It applies to everyone in the company, as it is essentially the code of conduct. Everyone at Google is expected to abide by it and not "be evil". Simply put, it's all a part of the culture at Google and the way things operate there.
Simply put they are a company that has one purpose - to make money. They will attempt to do that within the confines of the law and at times they will push the limits like in the linked safari lawsuit.