Who decides how much profit goes to the writer?

Writers themselves. When uploading their book, writer has to specify the amount they want to earn per copy of the book sold. The book is priced accordingly and the amount goes to the authors account after the book has been sold.