As in any business world, referrals matter in publishing. I wish I could say that books are bought by publishers on merit alone, that it doesn't matter who you know. But I've learned the hard way that your network, something you may or may not have developed as you wrote your book, is a very useful element when you release that new baby into the world.
People help people, and no more so than in this tight-knit industry. A fellow writer commented decades ago that everyone knows everyone else at the agented-manuscript level. While this may not be totally true, the marketplace does operate on subjectivity--which comes down to who you know, and what their opinion is.
Of course, there's business smarts too. An editor may love a manuscript but her sales team isn't convinced because of the numbers. But that editor's enthusiasm is still the first spark, the necessary one that starts the process. How does that editor get sparked? Usually, someone presents the book to her, the concept catches her attention, and she reads the manuscript. That someone might be an agent or a fellow editor or even a friend. People helping people.