Herding has often been blamed as one of the possible causes of market instabilities, ultimately yielding to bubbles and crushes. On the other hand, researchers hypothesized that financial systems may benefit from the so-called wisdom of the crowd. To solve this apparent dichotomy, we leverage a novel financial market model, where the agents form their expectations by combining their individual return estimation with the expectations of their neighbors. By establishing a link between herding, sociality, and market instabilities, we point out that the emergence of collective decisions in the market is not necessarily detrimental. Indeed, when all the agents tend to conform their expectations to those of one or few leaders, herding might dramatically reduce market efficiency. However, when each agent accounts for a plurality of opinions, thus following the wisdom of the crowd, market dynamics become efficient. Following these observations, we propose two alternative control strategies to reduce market instability and enhance its efficiency.