for those who do want to learn ....
meeting or beating earnings is a stock market game . analysts and traders try to anticipate the next quarters earnings ... the worse the economy the lower expectations and estimates are ...the better the economy the higher expectations are for earnings ...
stocks tend to have very low earning expectations in recessions ... so it is not hard for companies to beat expectations once we start to come out of the recession ... stocks tend to soar early on coming out as earnings are easy to beat . but as profits grow , p/e's go up and earning expectations go higher and higher ...
so higher profits tend to produce lower over all returns while lower profits tend to see bigger gains as expectations are lower .
2019 saw markets hit new highs , earnings fell to 2014 levels on the s&p 500 in 2019 so valuations and market growth did not follow earnings....markets should have fallen based on earnings but p/e's rose as fear greed and perception propelled markets .
so if you look at the data you see there is no direct link to better profits create higher percentage gains ... stocks still go up but not nearly as much as we see when profits fall and expectations for earnings are lower .
the biggest market gains tend to be when we see (-10%) to (-25%) drop in profits which saw 28.6% gains in the market
the smallest market gains happen when earning expectations are high and are up 20% or more , the s&p returned a mere 1.3% in gains on average
so yes stocks go up when earnings are beat but there are times they go up greater based on earnings levels
https://www.aaii.com/investing-basics/article/earnings-estimates-and-their-impact-on-stock-prices