One of likely many contributing factors is the definition of GDP. Consider the humble iPhone, produced by Apple contractor FoxConn. FoxConn is headquartered in Taiwan, while Apple is headquartered in Cupertino, California, USA.
Apple owns the intellectual property that goes into the iPhone, and so iPhone sales to American citizens support growth in Apple stock. But because the iPhone is produced offshore, when an American citizen buys a cell phone that buoys the stock of an American-domiciled company, it does not contribute to American GDP - it contributes to Chinese, or Taiwanese, or wherever the factory happens to be, and in fact subtracts from American GDP.