Pretty much what others have said.
The agent thing doesn’t exactly matter, but it does… in a way. It matters because you need to make sure they’re a good agent who can find the best home for your book—they’re considered your business partner, and of course, they should care about where your book goes because they only get paid when you get paid (when you have a contract).
In order to do this, they pitch it to anyone who will listen, anyone who might like the book and who knows it could sell (after all, they also know what sells and wouldn’t have chosen you otherwise). This means the book can land anywhere from the Big Four to a smaller but still notable publishing house.
But just because they should care, doesn’t always mean they’re supposed to be a good agent. There are some agents who are bad, who don’t take the time to shop around, who don’t try to go for the big stuff, etc. That’s why it’s good to do your research on said agent, and or their agency.
So, at the end of the day, it doesn’t matter who the agent, in particular, is… but it does matter to know that they are good at their job. If that makes any sense?
Also, you can still have a great agent but not get published by the Big Four, whether at all or at first. Getting published with any of the big boys is a rarity, and also very lucky. And it doesn’t matter if you get published under their main name or their imprints (because even if you do under an imprint, you are still being published by that publishing house)—it’s an honor overall. But it doesn’t happen to everyone.
On that note, just because a book was published under the Big Four also doesn’t mean they will become an instant success. The market for the book has to be right, the marketing you do also needs to be good, and so on. So much goes into making a book a success, and sometimes and most of the time, it just comes with luck.
Another thing to think about is that a lot of books will become a success after the book is released (and I’m talking, a few years after). The Hunger Games, for example, got published in 2008, but didn’t really start to catch fire (pun intended lol) until around 2011-2012 when the movie was being made. Same thing happened with Harry Potter. Not many read it, until a few years later as the series went on and people started seeing it more often, then the movie came and around that time, it blew up.
These Violent Delights may have blown up, but it seems it was more recently (within the last year, so it’s technically taken the book a year to become such a huge success). And yes, it seems that it made it to the bestseller list, but unfortunately, the bestseller lists are curated. This means that even an unsuccessful book can make the list. Plus, even if it is on the bestseller list, doesn’t always make it a bestseller in every aspect. From what I’ve gathered, a bestseller that isn’t an actual bestseller is on the list because they liked the book or there’s connections in there between agent/publisher to the curators. Or, it can mean it’s a bestseller for the particular genre they’re in. Like if a historical fiction novel hit the list, it doesn’t mean that everyone is buying it. It can mean that, for an historical fiction novel, it did really well in that genre. If that makes any sense?
But I personally don’t know if this is all correct. It’s my two cents. Still learning as I go haha.