It's just logical that competition, and a common self interest will naturally bring to light the best ideas for profit that will, over the course of time, be beneficial to society as a whole. Trying to plan an economy is just disastrous, and has always been disastrous in the past. Just let the free-market decide what is worth spending money on, and society will thrive.
It was a metaphoric expression used by Adam Smith to, as he put it, “describe in a more striking and interesting manner”, the hidden motives of individuals, whose self-interested actions have intended benficial consequences for them, but such actions by individuals may also have unintended consequences, sometimes benign and sometimes malign, for others. Examples include businesses producing consumables that customers want and enjoy that may make society better off, while businesss persuading governments to impose tariffs, say, may reduce cmpetition and raise prices, making consumers worse off. The metaphor of “an invisible hand’ is now widely applied without care to imply some mysterious entity consciously acting in markets to bring about benefits to everybody. Whereas governments and businesses that ignore poullution, say, may make everybody worse off.