I'm not going to tell you anything you don't already know: writing is hard. Getting an agent is harder. Getting published, even with an agent is tough too. You have to really love what you do, really want to make it to keep on doing it. As the rejections pile up and your confidence sinks to low ebbs, it's really easy to think about quitting.
And a lot of writers do quit. They write one book, query it, get nowhere and decide writing isn't for them.
Others don't quit. They keep going, even when the entire process is like bashing your head against a wall. I know; I'm one of them. I've written six complete books. I've queried three of them with no success and have just started querying a fourth. I have seven pages of rejections in a specially named 'rejections' folder in my email. Not all of them are for my novels; I geared up to querying my novels by submitting short stories to various anthologies and publications.
Yes, rejection gets me down. Yes, sometimes I feel like everything I write is a pile of poop and I might just as well quit because every other writer out there is more talented than me.
But I don't quit. I love writing. Putting together stories and finding new and unique ways to put words together is a part of me. I love the journey I take with my characters, even when I put them through hell (which I tend to do a lot). And the rejections just make the acceptances sweeter. I get such a surge of excitement when I see an request for a full or a partial in my in-box. And there is nothing like coming home to find the package in the mailbox with a book or magazine inside. A book with my words between the covers. So no, I'm not quitting any time soon.
Do you ever want to quit? What makes you keep going?