I'm stuck on the fact that an agent may like the writing and story but pass because of the ending. Isn't that something that can be fixed easily with the writer?
If an agent likes an idea well enough to request a full but doesn't like the ending, wouldn't a request to rewrite be called for?
I feel like this is a question I should answer before more people ask it.
First of all, I slightly oversimplified in my answer. There was probably a massive problem with the ending. My boss, if she likes the manuscript a lot, will devote some time to asking for a rewrite (a major thing to ask of a non-client) and working on those edits (a major thing to do for a non-client) and has lost lots of (wo)man-hours on them. They have still not resulted in taking the client on, because either the writer didn't want to edit or simply couldn't edit, something I'll get to in a second. Some agents are really willing to work on potential manuscripts because they're fairly sure the manuscripts can be fixed and sold, and they're usually right. One of the current bestsellers on some list, I think it's Amazon, was a book that I remember working on for my former boss. It arrived as a really good idea for a book that was mostly done, but had some narrative problems, and 3 years ago I was asked to read it and give my advice. I then went to work for someone else, and though I had my doubts about it, obviously the book was fixed because now I've seen it reviewed across the web and shows up on bestseller lists. I also remember that my former boss really, really loved this book. She didn't just think it was a great manuscript; she had personal attachment to it. Agents don't feel that way about every manuscript. My current boss has two bestsellers on the list, both non-fiction, at the moment, though she's had others since I've been with her, but not things I've worked on for the most part, or saw when they when they arrived as a potential client.
Now, onto the the writers. My former professor once said, "Writing is easy. Editing is hard." It's probably the only thing ever said that I completely agreed with in my MFA program. For most writers, editing is hard. For me, it's particularly unbearable, and as a published author I dread it and fear it and still do a lot of it. First my agent asks for revisions, then the publisher does. Last week I submitted a book to my agent that I've been editing for a year now. It took me a month to write and a year to edit, and it's still not in the best shape it could be, but it may be in the best shape I'm capable of making it. I'm really attached to this project, and I want it to sell and succeed, but in my mind I always imagine a book that's much better than the one on the screen, and despite many rewrites I can't see to get there. I honestly don't know if she'll ask for another revision, which I'll do if she asks, or do some minor touch-ups and send it out and see if it sticks. At this point to her I'm a proven seller, and I've made her some money, so I'm worth the risk, but it still might not sell and won't look good for her or me if it doesn't. It's depressing for writers to not have their books sell, but it's also bad for agents, in terms of their crucial relationships with editors, to keep sending the editors things they won't like.
Endings aren't easily "fixable." For some writers, any revision is impossible. These are writers who either have such a name for themselves that anyone will publish them or they never get published because no one wants to work with them. For other writers, it's simply a matter of ability to craft a story properly, and they don't have it and may not be interested in the implication that they need to acquire it. Other people will never be great writers, and may succeed in one genre and fail in another, which is probably my slate in life, as I can't seem to get published in science fiction but have two other genres under my belt. Agents know all this, and it's hard for them to invest time in someone who, honestly, may or may not be able to produce the work that the agent will then try to sell, and may or may not succeed in doing and only for very little money.
Agents are accused of not nurturing writers, but a lot of agents are very up-front about not being the right person to do this. I was at a WorldCon where an agent gave a panel, and he said outright, "I will not hold your hand. I will not revise your work. I will try to sell work for my clients for the highest amount possible, and then I will make sure the publishing company does all that it can to promote the book. That's what I do. If you don't like it, find another agent."