First, it happens through competition. Good psychology hacks are things like tinder's fast paced swiping. Out of the squillions of dating apps, the one with a good hack won. I think Facebook used an identical hack for its first version, the hot-or-not version. Twitter's basic concept. Snapchat's. Lots of examples. All good "psych-hacks" that formed a core of successful products, arrived at through a sort of natural selection process. I suspect that almost any app which does not "solve a problem" leverages some hack instead.
Second, psych-hackers FB actually employ are not psychlogists. They're data scientists doing split tests. If this works like that, will you like more posts. A/B testing is really behavioural psychology expirementation, weaponized.
I think both of these are quasi-inevitable. But, constant optimization towards viral drek is not.
Where I think FB should be sheepish about is allowing the optimization to go on directionless. The only goals are quantitive. Quality is a foreign concept. No one has asked the question "what should FB be." The answer is simply "popular."
This isn't inevitable. Applied to businesses as a whole, you could replace "popular" with profitable. All businesses are under this imperative. But, that doesn't mean directionless. Businesses can strive to be all sorts of things in addition to (or preferebly as a path to) profitable. FB is itself an example of this.
What I want from FB (and Google) is a recognition that they are media companies, the biggest media companies. After that, they need to start dealing in quality. If you only optimize for quantity of reactions, shares and such while disregarding quality you become a shitty tabloid. No taste. No integrity. Just clickbait.
FB need to ask themselves "is the content (eg news) on FB of good quality?"