In the realm of fine art, Dictionary.com defines composition as "the organization or grouping of the different parts of a work of art so as to achieve a unified whole."
One of the elements of composition is juxtaposition, where elements are put near each other for the purpose of comparison or contrast.
For instance, when an artist wants to illustrate an overriding theme, he or she may put similar objects together to allow the viewer to extract that theme.
In other situations, the artist may want to make a point with irony. In that case, he or she may elect to put two or more objects together that have opposite connotations or symbolize opposite concepts.
The idea of juxtaposition is a visual one, but it works for other fields too, like literature. Sometimes writers will put two characters with different qualities next to each other to define their personalities, or write about two settings to create a complex context or a progression of an idea.