There are two examples, one for a bandit, the another one is for the government.
Suppose we have a simple economy, a bandit and a teacher. The teacher can teach the bandit, but the bandit can't offer anything of value to the teacher.
Suppose at the start the bandit has \$100, while the teacher has \$0. The bandit pays for lessons $100 and the teacher consequently teaches them. Now the teacher has all the money and the bandit has nothing but their gun. If we will stop here GDP will be \$100 because Consumption=\$100, while everything else is zero.
But our bandit being bandit uses their gun to take all money from the teacher. Here we go again, the bandit has \$100, while the teacher has zero. And again, our bandit pays \$100 for lessons. If we will stop here our GDP will increase by \$100, totaling to \$200. Conclusion #1: We will be able to increase our GDP with these robbing-spending cycles, each cycle increasing GDP by \$100.
Now let's replace our bandit with the government. Our bandit declares themselves to be the Sovereign over these lands, with God given divine right to take people's money by force, (i.e. to tax them). The teacher recognizes them as their Sovereign. We replace our robbing-spending cycle with taxing-spending cycle. The Sovereign pays for lessons, the teacher enjoys sitting on the money for a while and then they get taxed of all of their money. This time Consumption=0, but Government Expenditures increase by \$100 for each iteration of the cycle ("The State is me", as our Sovereign would say). Conclusion #2: We will be able to increase our GDP with these taxing-spending cycles, each cycle increasing GDP by \$100.