I’ve been struggling with this as well, because if GDP growth is measuring the state of the economy, the main actors being the companies should follow the trend.
There is however one big flaw in this thinking as GDP is linked to gross turnover, while the stock market follows the increase in margin.