It's true, they're just fulfilling their duties to shareholders. But, when corporations start using the government to stifle competition: this is a line that should not be crossed and deserves precisely the reaction that this article has mentioned. Google and Facebook have not crossed this line, at least not yet.
They're actions are rational, only if they succeed. If there's enough political reaction that results in the breaking up of these monopolies, it may not be so rational afterall.