Why is the axiom $(h \circ g)\circ f=h\circ(g\circ f)$ used to define morphisms? We know that $hom(A,B)$ is a set of morphisms from $A$ to $B$. If $f\in hom(A,B), g\in hom(B,C)$ and $h\in hom(C,D)$, then they have to satisfy the following axiom:
$$(h \circ g)\circ f=h\circ(g\circ f)$$
Why is this axiom even mentioned? If $f,g,h$ are indeed mappings in the traditional sense, then both are trivially equal to $h(g(f(a)))$, where $a\in A$. Are there some morphisms which do not satisfy such a relation/are not mappings in the usual sense?
Thanks in advance!
 A: I will define a category $\mathcal{C}$ by declaring that its objects are $$\mathrm{ob}(\mathcal{C})=\{\,\star,\,\ddot{\smile},\,\Box,\,\#\,\}$$
and that its morphisms are
$$\mathrm{Hom}_{\mathcal{C}}(\star,\star)=\{\mathrm{id}_\star\}
\quad \mathrm{Hom}_{\mathcal{C}}(\ddot{\smile},\ddot{\smile})=\{\mathrm{id}_{\ddot{\smile}}\} \quad \mathrm{Hom}_{\mathcal{C}}(\Box,\Box)=\{\mathrm{id}_\Box\}
\quad \mathrm{Hom}_{\mathcal{C}}(\#,\#)=\{\mathrm{id}_\#\}\\[0.2in]
\mathrm{Hom}_{\mathcal{C}}(\star,\ddot{\smile})=\{f\} \qquad\mathrm{Hom}_{\mathcal{C}}(\ddot{\smile},\Box)=\{g\} \qquad\mathrm{Hom}_{\mathcal{C}}(\Box,\#)=\{h\} \\[0.2in]
\mathrm{Hom}_{\mathcal{C}}(\star,\Box)=\{k\}\qquad\quad \mathrm{Hom}_{\mathcal{C}}(\ddot{\smile},\#)=\{\ell\}\\[0.2in]
\mathrm{Hom}_{\mathcal{C}}(\star,\#)=\{a,b\}\\[0.2in]
\text{all other }\;\mathrm{Hom}_{\mathcal{C}}(-,-)=\varnothing$$
The only thing left is to declare how the composition law $\circ$ behaves. Without the axiom that $$h\circ(g\circ f)=(h\circ g)\circ f$$
what's to prevent 
$$h\circ (g\circ f)=h\circ k=a,\qquad (h\circ g)\circ f=\ell\circ f=b \quad?$$
A: The key is the distinction between abstract and concrete categories.
With some simplification to ease the understanding, concrete categories are such that the objects of concrete categories are (essentially) sets, possibly with "additional structure"; and morphisms are just maps between these sets (that respect the additional structure); and composition of morphisms is simply the composition of maps (hence trivially associative); and the identity morphism of an object is simply the identity map.
An abstract category is just one satisfying the axioms you're studying right now. There is no guarantee that a given abstract category $\mathbf C$ can be viewed as/turned into a concrete category. In the language of category the question is: Does there exist a faithful functor $\mathbf{C}\to\mathbf{Set}$? (There is also such a functor behind it when I said above "objects are (essentially) sets"; and to be precise one must mention which of possibly many inequivalent functors into $\bf{Set}$ one uses, but in most examples it is clear when objects have an "underlying set")
The usual example of a non-concretizable category is the $\bf{hTop}$ of topological spaces with homotopy classes of continuous functions as morphisms and has already be given in comments or in the above Wikipedia link. Note: Just because the morphisms are not immediately given as functions (but rather sets of functions) does not yet preclude the possible existence of a faithful functor to $\mathbf{Set}$ (e.g. there might a priori be something like a "canonical representative" in each homotopy class), the non-concreteness requires a separate proof (in this case by Freyd). Also note that the associativity of morphisms in $\mathbf{hTop}$ is immediately obtained from the associativity of maps because the composition is derived from the composition of representative - but still the composition is not composition of functions.
A: Let $X$ be a topological space. Now let's try to define a category where the objects are the points of $X$, and the morphisms $x \to y$ are precisely the paths going from $x$ to $y$ (i.e. continuous maps $f : [0,1] \to X$ with $f(0)=x$, $f(1)=y$). It is clear how to compose two paths. In the first half we go the first path, in the second half we go the second path. But this composition won't be associative. Instead, $f \circ (g \circ h)$ is only homotopic to $(f \circ g) \circ h$:

In fact, if we define the morphisms to be homotopy classes of paths, we get a category, the fundamental groupoid of $X$.
