Publicly stated principles such as these give a clear framework for employees to raise ethical concerns in a way that management is likely to listen to.
For example, one of my previous employers had ten "tenets of operation" that began with "Always". While starting each one with "never" would have been more accurate in practice, they were still useful. If you wanted to get management to listen to you about a potential safety or operational issue, framing the conversation in terms of "This violates tenet #X" was _extremely_ effective. It gave them a common language to use with their management about why an issue was important. Otherwise, potentially lethal safety hazards were continually blown off and the employees who brought them up were usually reprimanded.
Putting some airy-sounding principles in place and making them very public is effective because they're an excellent internal communication tool, not because of external accountability.
Google might be in a position to not get bullied around much by investors though, so that line of thought might be slightly off topic here.
It's true that many boycotts fizzle out, though.