I'm an indie author. I self publish my ebooks on Amazon KDP, Smashwords, and Kobo Writing Life. My paperback books are published through Createspace. None of these publishing platforms cost me any money. I just upload my ebook and paperback files and then they become available for sale world-wide. When I self publish a paperback through Createspace my book is only printed once it's ordered by a reader. This is called POD Publishing / Print On Demand Publishing. It means that my paperback novel is only printed when a real order is placed for it. If you go to amazon.com and order one of my books viewAuthor.at/SuzKorb Amazon prints off one copy on their book making machine. This saves trees, and ebooks save even more trees. Win.
With vanity publishing a writer basically hires a printing service to print hundreds, even thousands of their books in one print run. A vanity publisher charges authors thousands, even tens of thousands of dollars to print their book. The books are paid for by the author who then has to do all marketing themselves. I'm going to give you an example of vanity publishing from experience, luckily not my own experience.
Years ago, when I lived in America, I was due to be moving into a new rental property. The previous tenant had used a vanity publisher. The first few times I viewed the property I was shown his collection of printed books. He'd purchased thousands of copies of his vanity published book and they were stacked in boxes in the garage. He told me that he even landed a spot on a TV talk show, to promote his book, because he had connections with friends in the biz. It didn't help. His books didn't sell and were left to rot in the garage. I felt bad for the guy and asked if I could have a copy of one of his books, then and there. And I asked him to sign it for me. I also asked if he'd ever written more, but the experience, and financial devastation of vanity printing his own books, put him off writing forever, and he never wrote again.
I moved into the property after being promised he'd have his decaying stacks of books removed. Well guess what? He left them and skipped town.
That's right, I had to foot the bill to have his useless books removed and incinerated! So you can understand my abhorence of vanity publishing. I don't want anyone else to be suckered into paying a vanity publisher tens of thousands of dollars, only to get into debt and suffer mentally for it too.
It was years and years before self publishing became popular. I'm so glad I discovered it. Self publishing (not vanity publishing) allows me to write whatever I want, and make it available for purchase with no cost to me. I'm in charge of prices too and I always keep my ebook and paperback prices as low as possible. I do want readers to enjoy my books that I had fun writing!
So vanity publishers sell books back to the author, traditional publishers sell books to wholesalers and bookstores, and self publishers (like me) sell books direct to readers.
And the customer is the author, not readers.