One could say that the story begins with Beilinson's conjectures on the existence of a theory of motivic cohomology. In accordance with the insights of the Grothendieck school that cohomology theories in nature always come with a corresponding "category of coefficients", and that it is very often profitable to work at the categorical level instead of at the level of cohomology groups, Beilinson also conjectured that there should exist triangulated categories $DM(S, \mathbf{Z})$, where the conjectural motivic cohomology groups can be computed as Ext-groups. By a category of coefficients I mean a system of (triangulated) categories, for each scheme $S$, equipped with the formalism of six operations (the objects are thought of as "coefficients" for cohomology).
When Voevodsky set out to construct these categories $DM(S,\mathbf{Z})$, he was guided strongly by the principle that motivic cohomology should play the role in algebraic geometry of singular cohomology of smooth manifolds, whose category of coefficients is the derived category of chain complexes of abelian groups. In fact, singular cohomology is only one of many "generalized cohomology theories" on smooth manifolds (other examples include topological K-theory and cobordism), and unlike singular cohomology, most cohomology theories cannot be computed as the cohomology groups of a chain complex, but rather must be defined as the homotopy groups of a space or spectrum. Thus, inspired by the Eilenberg-Steenrod axioms, let's define a cohomology theory on smooth manifolds to be a presheaf $\mathcal{F}$ of spaces on the category of smooth manifolds satisfying two conditions. First we require that it is homotopy invariant: we have $H^i(X \times \mathbf{R}, \mathcal{F}) \simeq H^i(X, \mathcal{F})$ for all smooth manifolds $X$, where $H^{-*}(X, \mathcal{F})$ denote the homotopy groups of the space $\mathcal{F}(X)$. Secondly we require the existence of Mayer-Vietoris long exact sequences (or more precisely that $\mathcal{F}$ satisfies a homotopical version of the sheaf condition). Then one can prove that the category of cohomology theories in this sense is equivalent to the homotopy category of spaces (to make precise sense of the "category of cohomology theories" one should use homotopical or higher categorical language). If we take presheaves valued in chain complexes instead, we get a category equivalent to the derived category of abelian groups (= the category of coefficients for singular cohomology).
Voevodsky's first construction of DM, which goes back to his 1992 thesis, was directly inspired by the above. Thus the idea was to take presheaves of chain complexes on schemes (over some fixed base $S$), and impose homotopy invariance with respect to the affine line $\mathbf{A}^1$ instead of the real line. An important question is then which Grothendieck topology to take for the sheaf condition. Instead of the Zariski or Nisnevich topologies, Voevodsky used a topology he called the "h-topology", which is essentially what you get when you take the Zariski topology and you add in proper surjections as coverings (the name came from his expectation that this topology seemed to be "suitable for the developing of the homotopy theory of schemes"). With this definition he was able to construct Gysin sequences and prove projective bundle and blow-up formulas in motivic cohomology.
Let's come back to the setting of smooth manifolds for a moment. The Dold-Thom theorem says that the (reduced) singular homology groups of a smooth manifold $X$ can be computed as the homotopy groups of the infinite symmetric power $S^\infty(X)$. Inspired by this, Suslin constructed a singular homology theory for schemes by taking an algebraic analogue of infinite symmetric powers. In 1996, Suslin and Voevodsky were able to prove a comparison of Suslin's singular homology construction with étale cohomology with torsion coefficients. After this work, I think Voevodsky realized that what was really important was perhaps not the h-topology itself, but just the fact that h-sheaves automatically admit transfers. Indeed, the existence of Gysin sequences and projective bundle formula only actually require the Nisnevich topology. In view of this he then defined (the effective version of) DM in the form we use today, which is more or less rigged so that hom groups in the category compute Suslin homology (at least over a field). The idea is that instead of using the h-topology, we just use the Nisnevich topology but then force our presheaves to have the additional structure of transfers in a different way: we take presheaves on the category whose objects are smooth $S$-schemes, but whose morphisms are Voevodsky's finite correspondences.
Above I have been discussing the effective categories $DM^{eff}(S,\mathbf{Z})$. The non-effective version $DM(S,\mathbf{Z})$ is just obtained by forcing the Tate twist operation $X \mapsto X(1) := X \otimes \mathbf{Z}(1)$ to become invertible. This is analogous to the relationship between the bounded-below derived category $D^+(\mathbf{Z})$ and the unbounded derived category $D(\mathbf{Z})$, where the latter can be thought of as taking $D^+(\mathbf{Z})$ and forcing the suspension functor $[1]$ to become invertible. The main motivation is to be able to express duality phenomena: for example, one can prove that for a smooth proper $S$-scheme $X$ of relative dimension $n$, the dual of the motive $M(X) \in DM(S,\mathbf{Z})$ is given by $M(X)(-n)[-2n]$.
For a reference on triangulated categories of motives, I would recommend the book on the subject by Cisinski and Déglise. A shorter reference that could be easier to start with is the paper "Finite correspondences and transfers over a regular base" by Déglise.