In the technical construction of an operad, the composition rule is defined just for "two-level" trees such as the one I just wrote. Then, in order to ensure that it can be uniquely extended to a rule for all connected trees, the associativity condition is imposed as a requirement on the composition rule.

Equivalently, one could start by defining a composition rule for all connected trees. Then, the following associativity constraint would be imposed on the rule. Suppose you had a tree of morphisms \\(T\\), with child trees \\(T_1,...,T_n\\). Let \\(T'\\) be the tree whose root is the same as \\(T\\), with children \\(U_1,...U_n\\), where \\(U_i\\) is the composite of \\(T_i\\). Then the composite of \\(T'\\) must equal the composite of \\(T\\).

In other words, the composite of a tree must equal composite obtained by first collapsing (composing) each of the child subtrees.