I don't understand what the point is of specifying the codomain of a function. For example, if I ask, "Given the function f: $\Bbb R$ $\to$ $\Bbb R$, where $f(x) = x^2$, what is the image of f?", how is that any different from asking, "Given the function $f(x) = x^2$ whose domain is $\Bbb R$, what is the image of f?" In both cases, the answer can only be "The set of all real numbers greater than or equal to $\theta$". Supplying the codomain in the first question doesn't add any more useful information.
Maybe a more precise way to phrase my question would be: What's the use of distinguishing between a number that's a part of a function's codomain but not its image, and a number that is neither part of the function's codomain nor its image?