A lot of authors today are self-publishing, or, as some call it, "indie publishing." (I prefer self-publishing, since when I got into this business, "indie" referred to small publishers that weren't imprints of larger companies.) I've seen a few people ask why they should even bother considering working with a publisher when they can self-publish and earn more money.
Just as a reminder: Self-publishing means that you, the author, are the publisher of the book. You might pay someone to format or print the book, but you are hiring them to do so. You're in charge. If you're paying a company to *publish* your book, and their name appears on the book, that isn't self-publishing.
So anyway. Pros and cons. Higher earnings can definitely be a pro. If you're published by a publishing company ("traditionally" published, as some call it), the profits they get from the books they sell are split among author, editor, sometimes illustrator or cover artist, and other expenses. The author gets only a small percentage. If you self-publish, you pay for editing and cover art up front, so once those are covered, any profits are yours.
More control is another pro. If you publish your own book, you don't have a publisher dictating what will or won't sell and what type of content is or isn't appropriate. It's all up to you.
On the flip side, one con I can think of off the top of my head is that when you self-publish, you're solely responsible for promoting and marketing the book. If you're with a publisher, they're supposed to do some of that for you. On the other hand, some small presses don't do much if any promotion and marketing, so this one may be a wash.
Another con is the up-front cost. When you're published by a publishing company, they pay the editor, cover artist, etc. If you self-publish, you have to pay in advance for these things and hope you'll earn back the investment. You might be able to make your own cover art, but I wouldn't advise it unless you're very, very good with programs like Photoshop and know where to get royalty-free stock images. And no matter how good you are at editing your own work, I would never, ever advise someone to self-publish a story without having at least one other editor look it over. And I don't mean your spouse or your best writer friend. I mean a professional editor.
The last con I'm going to mention in this post is the negative impression some people have of self-published books. While this is changing, self-pubs in general have a reputation for poor-quality product and for being "stories publishers didn't want."
Self-publishing is definitely a viable option for publishing your work. It's just important to weigh all the positives and negatives before you make a final decision about whether to go that route.