I think that writing is art if it is well done. It can be viewed as an art needs skills and proficiency to perform, and should be presented in an attractive way to make sure that reader will be motivated to pursue reading the book regardless the subject matter. Many writers consider their books as nonprofit a commodity ( this helped to disseminate information and knowledge), while others see their books as efforts should be rewarded by selling this a commodity. This depends on the writer or the institution which publishes.
Definitely writing is an art as no great writing did accomplish without stylistics and cognitive process. Publishing is busnjess, to some extent, it is write because many predatory publishers are dancing in it.