Genres were certainly not invented by publishers. as they date back to the hand-copied manuscript stage. Genre definition is a critical tool to discuss different types of writing, with different concerns and aims. As such, it can be very useful in discussion, analysis, and (as J-Sun points out) aiding a reader find a particular type of literature they especially favor.
On the other hand, a rigid standard of genre definition tends, as I've said many times before, to lead to an incestuous form of writing which breeds only with itself... ultimately a barren process. (Think of the eighteenth- and early nineteenth-century Gothic, for instance.) Cross-pollination between different types of writing is a healthy process which allows for growth and change, and opens up new techniques and areas to writers. And, as sf and fantasy have both cross-bred numerous times over the years, the definitions between them tend, at most, to be provisional when good, or flat-out stultifying when bad.