Thats where your political opinion comes into place.
Generally most right wingers are capitalists and no matter how much money someone makes (legally), its money they earned and that shouldnt be taken away from them. That means if there companies do great and make the GDP grow, most of that money will end up making the service/product better and with the CEOs. Profit doesnt get spread between everyone that works in a company obviously.
Left wingers would argue, that the people here and the state have the obligation to care for everyone and kinda want to distribute wealth. This works by for example using taxes, so companies and people that earn over X amount of money have to give away more taxes, which then will be used for whatever its needed. Roads, healthcare, police/security etc..
In many countries you have to pay for profit/high earnings, so people tend to immediately use the money to invest it. If a company earns 10 million, but before they pay taxes they invest 9 miollion, they will only have to pay taxes for the 1 million. Lefties say this is a good thing as the money get invested into the market again. Some right wingers heavily agree with this aswell though.
tldr: "So what's supposed to happen when gdp goes up?" Based in your political views it should either end up making those people rich that own the companies that made the GDP grow OR parts of that should be redistributed by using taxes or whatever tools there are to redistribute wealth.
Im on the lefty side here. If a company makes $100.000 and without spending much more they make $200.000 the next year, that money should partly be used to either make veryone in the company earn more or it gets redistributed via taxes.
Funny enough the same people that say "taxation is theft" have no problem exploiting the work of people, basically stealing from them aswell.