When you self-publish a book, you need to do way more than just writing the book. You have to do all the things the publisher would have done for you.
By self-publishing, you can get 80 or 90% royalties, instead of 10%, which I think it's worth. It might not be worth for everybody, but, considering how much time I put into writing the book, I wouldn't be happy getting just 10% profit.