Publishers will always prefer to publish books by authors who write all their books in the same or at least in related genres, because
an author is a brand
and the clearer a brand is defined the easier it is to market it.
You can think of this in terms of a store. If you want bread, you go to a bakery, because you know that bakeries sell bread. Over time, you test the bakeries next to you and find the ones that provide the quality you like, and from then on you will buy most of your bread from these bakeries.
Now imagine, that all the stores in your city would offer an ever changing range of products. If you wanted to buy bread, first you wouldn't know where to go to get it. You'd have to go from one shop to another until you found one that sold bread. And then you wouldn't know what quality that bread had. The chance that you would be disappointed would be very high.
So which system of buying bread do you prefer? The one where you had to waste countless hours each week finding your foods in different stores and would be disappointed by the quality about half the time? Or the one where you know where you can get what you want in the quality you want?
Most readers today prefer to buy books from known authors writing in familiar genres published in established imprints. Most readers prefer to know that they will get what they want to get.
Agent Rachelle Gardner writes in a blog post:
Can I write books in multiple genres and expect to build a successful publishing career?
This is a marketing issue, first and foremost. If you want to publish books, attract a loyal readership, and have long-term success as an author, then you’ll need to pick a genre, do it well, and keep doing it over and over. Simple as that. All the arguing in the world and all the talent in the world is not going to change this reality.
You need to specialize, because a publisher can’t afford to try and reach a whole new audience with every single book. As an author, neither can you. If your first book is a historical romance and 25,000 people buy it and love it, you now have 25,000 historical romance readers eager for another book from you. If your second book is a contemporary suspense, you completely give up the audience you’ve already built (leaving them hanging, by the way) and you have to build a new audience from the ground up. How much sense does that make?
It’s simply not feasible, especially in today’s competitive market, to try and be a jack of all trades.
Brand is the single most important factor in a writer's success. For example, Megan Lindholm once explained in an interview that she chose to begin publishing under the pseudonym Robin Hobb because book sellers had stopped ordering books from a writer they expected to not sell well. Her brand had deteriorated and no matter how good her next book was, booksellers were unwilling to give it a chance under that brand name!
Of course there are exceptions where famous (!) authors expand to new and different genres, but they are exceptions. For the average author it is usually advisable to use different pseudonyms for different genres. Even J. K. Rowling chose to continue publishing her crime fiction under another name so as not to confuse the audience and water down her brand. Because not everyone who reads crime fiction likes Harry Potter and the name of Rowling might be a reason for some readers to not buy her non-Potter books.