The logic of Silicon Valley sometimes works in strange ways.

Take the public-relations campaign commenced this week by a collection of high-profile technology companies: AOL Inc., Apple Inc., Facebook Inc., Google Inc., LinkedIn Corp., Microsoft Corp., Twitter Inc. and Yahoo! Inc. In an open letter to Congress and President Barack Obama, they called on the U.S. government “to take the lead” and curtail its digital surveillance.

Their effort is richly hypocritical, unintentionally revealing -- and possibly worthwhile.

First, there’s no small amount of self-interest animating this movement. Many of the companies involved acquiesced in government surveillance for years. They’re now finding their voices just as their reputations and bottom lines are threatened by bad publicity, as revelations from the former intelligence contractor Edward Snowden continue to make news.

More to the point, intruding on privacy -- collecting, packaging and selling personal information, often without users’ full knowledge and sometimes without their informed consent -- is generally what these companies do for a living. The information Facebook collects about you and sells to marketers, which you sort-of kind-of willingly divulged, almost surely dwarfs what the National Security Agency may have inadvertently seen about you. And the NSA is subject to a vast amount of (admittedly imperfect) oversight. The same can’t be said for these technology companies.

There is a difference, of course, between corporate and state surveillance. A corporation acts on behalf of its shareholders to make a profit. It doesn’t have the vast powers - - to tax, to detain, to take life -- of the state. Nor is it expected to protect citizens from terrorists.

And the hypocrisy of this effort is mitigated somewhat by the message itself. The five principles the companies advocate - - increased transparency, limited data collection, expanded oversight, the free flow of information and “avoiding conflicts among governments” -- are all commendable. They’re so logical and ethically sound, in fact, that they seem like just the sort of thing private companies should adhere to when collecting personal data.

Here’s an idea. Each of the undersigned companies could take the first step and commit to honoring the Consumer Privacy Bill of Rights, which was published by the White House in February 2012. The bill would give consumers much greater say over what data is collected about them and how it’s used, and demand much greater transparency and accountability from technology companies that handle your personal information.

This may not be quite what these companies had in mind. But the principles they’re advocating show that they understand an important concept: Without proper oversight, data collection -- whether it’s done by spies or social networks -- lends itself to abuse.

Privacy is one of the defining public-policy debates of the digital era. Committing to the bill of rights now would demonstrate -- as no number of open letters or vague principles would -- that these companies understand that. And that they really are on your side.

To contact the Bloomberg View editorial board: view@bloomberg.net.