A directed graph (diagram scheme, quiver) is a quadruple $(O, A, s, t)$, where $O$ is a set of objects, $A$ is a set of arrows and $s$ and $t$ are two mappings $s, t: A \to O$ ("source" and "target" of arrows respectively).
Then a category is defined as a directed graph with two additional mappings $id: O \to A$ (called identity) and $\circ : A \times_{O} A \to A$ (called composition), following usual rules of associativity, composition with identity etc.
The confusion with that definition for me is that it looks like any other definition in style of "a set with some extra stuff". I mean, for example, I can take any set and define group operations on it. But I can't take any directed graph and define a category structure on it. E.g. let $D = (\{1,2,3\}, \{a,b\}, s, t)$, where $s(a) = 1$, $s(b) = 2$ and $t(a) = 2$ and $t(b) = 3$ (i.e. there's no possible choices for identities and compositions). Identities and compositions restrict the choices of directed graphs.
What's wrong with such reasoning? And what is correct way of thinking about such definition of category?
NB. That's not a question about how to construct a free category on a given directed graph, it's about construction of a category according given definition.
UPDATE. Thanks to the answers, now I see where's the error in my reasoning. But confusion is still there. Citing Categories for the Working Mathematician:
Every category $C$ determines a graph $UC$ with the same objects and arrows, forgetting which arrows are composites and which are identities. Every functor $F: C \to C'$ is also a morphism $UF: UC \to UC'$ between the corresponding graphs. These observations define the forgetful functor $U : \mathbf{Cat} \to \mathbf{Grph}$ from small categories to small graphs.
How this underlying graph of category relates with the one mentioned in definition of a category? They can't be the same just because underlying graph doesn't contain identities and compositions.