A torus $S^1 \times S^1$ retracts onto either of those component circles $S^1 \times \\{pt\\}$ or $\\{pt\\} \times S^1$. It does not deformation retract onto any of them. Even more extreme is that every space retracts onto any point contained in it, but won't deformation retract onto it - most spaces aren't contractible.
These are typical examples: all you have is a map onto a subspace, not a map _and_ a deformation of the identity map to your map.
Perhaps the most important point here is: a deformation retract is automatically a homotopy equivalence. As in the example above, a retract rarely is!