What is a function? Informally, it is a process, or an assignment, from an input set to an output set. It is not just the process or assignment that forms a function, but specifying the input and output is part of what it is. Formally, a function is a triple $(A,B,f)$ where $A,B$ are sets and $f\subseteq A\times B$ is a subset of the cartesian product, i.e., a relation from $A$ $to$ $B$. If instead one wanted to view the function $(A,B,f)$ as equivalent to $(A,Im(f),f)$ then one needs to add a condition to an otherwise very clean definition. So, to force the codomain to be the range actually burdens the definition rather than simplify things. That is one reason not to force such things.
Another reason is so that one has no problems talking about composition when it's obvious one should be able to talk about composition (so actually this is a category theoretic reasoning). Suppose that $f:A\to B$ and $g:B\to C$. If I want to know if the composition $g\circ f$ exists I don't care what the actual range of the functions is. Just a glance as the domain of $g$ and the (ta ta ta taaaaaa) codomain of $f$. In other words, if the input type of $g$ matches the output type of $f$, then the composition is defined.
If we insisted that codomain=range, then the condition above will have to be replaced by "the range of $f$ is contained in the domain of $g$". And now I'll get into a bit of technical lingo from category theory. The resulting category from forcing codomain=range will be the category $Set_{Surj}$ of sets and surjections. It's a perfectly legit category, but it has far fewer nice properties when compared to $Set$, the category of sets and all functions. For instance, the empty set is characterized in $Set$ as an initial object (i.e., there is precisely one function from it to any other given set) and is dual to singletons, which are terminal. This is no longer the case in $Set_{Surj}$. The disjoint union of two (or more) sets is an example of a categorical product in $Set$, and is dual to the cartesian product. Disjoint unions are no longer coproducts in $Set_{Surj}$. Many other of the nice properties of $Set$ are lost if passing to $Set_{Surj}$.
In particular, many very convenient injections will no longer be allowed if we require all functions to be surjective. For instance, it is very convenient to be able to speak of the functions $f_y:\mathbb R \to \mathbb R^2$, given by $f(x)=(x,y)$, or various curves in the plane being parametrized by some function $\gamma:[a,b]\to \mathbb R^2$.