Smith realizes that if a modern economy is to prosper, it will do so through the efforts of businesses, not government. Smith understands that healthy, prosperous businesses will ultimately lead to a healthy, prosperous society with greater wealth and opportunity for all.
At the same time, Smith is completely clear-eyed about the various shenanigans that businessmen get up to in trying to protect themselves from competition. As Smith amply demonstrates, businessmen are not exactly the best adverts for a free market, as they're constantly looking for ways to game the system in their favor.
He's particularly scathing of how they come together and form conspiracies against the public: that is to say, how they routinely engage in anti-competitive practices such as cartels to keep prices artificially high, which prevent their companies from going to the wall. For Smith, such self-regarding behavior clearly does not conduce to the public good.
It's only if businesses adhere to the rules of the road, so to speak, that the public will benefit from their activities. Ultimately, it is free competition that will eradicate bad practices among businessmen. In turn, this will redound to the public good by bringing them the unalloyed benefits of the free market.