GDP is essentially the total yearly revenue of a country, so it's not directly comparable to a companies market cap.
GDP isn’t the total revenue of a country, total tax receipts are.
If you think of the German government as a business, they generate roughly 2X the revenue of Apple, but with 5 million employees vs. Apple’s 150k.
Of course, the German government doesn’t optimize for growth and expansion like a company does (at least…not yet in this century… nervous laugh)
Then this might blow your mind even more: In 2017, at a market cap of more than $2.1 trillion, Apple's market capitalization is larger than 96% of country GDPs, a list that includes Italy, Brazil, Canada, and Russia. In fact, only seven countries in the world have a higher GDP than Apple's market cap.