The goal of SO - that is to sayand/or the parent business group SE - or of any business, is of course simply to make money.
The internet is simply the advertising medium of today. In 500 years a summary of commercial history will be
It seems that from about "1950" to "2000", advertising was on a thing called "T.V.". We now have no idea what "T.V." is because records are unclear. It seems that from about "2000" to "2070", advertising was on a thing called "internet.www". We now have no idea what "internet.www" is because records are unclear.
When the internet was first launched, for five minutes it's primary purpose was pornography. Then there was five minutes where the primary purpose was online gambling ("stock lol trading" and also blackjack and sports). Since then the ord "internet" means "advertising". That's all it is and all it will ever be.
(Obviously, the world's biggest advertising concern by dollar amount, is a company called "google". Every single penny of money made by or involved with google is advertising.)
With "production-by-consumers" sites like SO, the typical outcome is to sell to Google, or possibly Facebook. A few sites - I believe SO included - actually make money (ie: from advertising) before selling to Google - and that's fantastic and admirable.
Regarding whether SO is a "good" thing (in some moral or social sense), is silly - of course it's a good thing. Car companies are good things, advertising companies are good things, supermarkets are good things. If you're say a pornographer it could easily be argued that's a bad thing, I can't see any meaningful way SO could be considered "bad"
The question
What is Stack Overflow’s goal?
is sort of bizarre, it's trying to sound profound.
It's no more complicated than asking "What is Ford's goal" (obviously, "make cars" ... sure, in the general sense "like any business, make money" is the ultimate meta goal - a trivial and unimportant observation). SO's " ' goal ' " is of course "provide QA forums". (Sure, in the general sense "like any business, make money" is the ultimate meta goal.)
It could be there's a lot of confusion because folks (for some unknown reason) see certain businesses (say, SO) as kind of ... I don't know, more like a lol-charity (like say Wikipedia is a lol-charity).
SO is a prduction-by-consumers business precisely like, say, tripadvisor.com.
The "goal" of tripadvisor.com is "offer crowdsourced travel reviews"
The "goal" of SO is "offer crowdsourced QA".
So what? Sure, with any business in a general sense "make money" is the ultimate meta goal - nothing confusing about that.