Yes, I understand the non-binary nature of it. But whose expectations? Those of the investors? What are their expectations based on? How do investors know what future earnings are "supposed" to be given the inherent uncertainty about markets...and about the future in general? And if a company doesn't perform up to expectations, is there any careful consideration or analysis of why it came in under them before its stock is sold? Maybe in some cases, but I'm skeptical about whether the expectations process is altogether as rational as some might argue.
But maybe what I'm expressing, given my general ignorance about econ, is not so much an objection to the process as sympathy for some of its victims. A company continues to make a profit but its stock falls. Business is a damned tough beat.
The same questions were asked over hundred years ago, and they were answered, imo, at the end of the 19th century by the theory of subjective value, a staple of the Austrian School of Economics. We don't really have a cardinal system of expectations. In other words, we cannot say with any degree of certainty that Company A should make a return of 5.5% annually based upon its financial statements. Humans use ordinal evaluations; instead. Company A should perform better than Company B should perform better than Company C, based on the attributes of each company. Stock price adjusts accordingly until investments with similar risk and growth potential reach P/E equilibrium.
Subjective value is more fluid and relies less on specific calculations, hence the existence of relatively simple calculation like ROA, ROE, current ratio, debt-equity, etc. If we achieve general consensus among investors as to the ordinal evaluation of investments, we can better understand the flow of capital between various investment instruments. If we have a general understanding of capital flows, and we have a system of benchmarking investments, we can make specific normative evaluations and earning projections about the financial performance companies "should" be achieving relative to other investments and historical performance. Obviously, the sticky wicket is risk assessment because risk perception varies widely amongst investors.
While it is true that stock price can fall despite positive earnings. It is also true that stock price can rise based upon structural improvement, like price leverage or competitive advantage, even if earnings never materialize. Just a strategic product announcement can change the fortune of a stock, even if the returns do not materialize for years.