From Wikipedia: Art for art's sake expresses a philosophy that the intrinsic value of art, and the only "true" art, is divorced from any didactic, moral, politic, or utilitarian function.
The concept is associated with the Avant-garde in that it divorces meaning and aesthetics from the object. It challenges tradition and invites innovation. It may focus on the process rather than the end result. Let the artist do what they want to do outside of the constraints of taste and marketability.
Autonomy of the artist/object is often in opposition to Form follows function, a principle associated with 20th-century modernist architecture and industrial design which says that the shape of a building or object should primarily relate to its intended function or purpose.
It may also be a reaction to Formalism. From Wikipedia: Formalism is the the study of art by analyzing and comparing form and style. Its discussion also includes the way objects are made and their purely visual or material aspects. In painting, formalism emphasizes compositional elements such as color, line, shape, texture, and other perceptual aspects rather than content, meaning, or the historical and social context. At its extreme, formalism in art history posits that everything necessary to comprehending a work of art is contained within the work of art. The context of the work, including the reason for its creation, the historical background, and the life of the artist, that is, its conceptual aspect is considered to be external to the artistic medium itself, and therefore of secondary importance.