Q:

Why don't we teach codomains of functions in high school? 

When I was a university student, I learnt that a function  is the data of three informations:

the rule that tells how to associate an object $x$ to its image $f(x)$, 
A domain $E$ where live the values of $x$ that are transformed by $f$,
and a codomain $F$, a space where all images can lives. 

So, an usual notation for an function is $ f:\begin{array}{rcl} E & \to & F \\ x & \mapsto & f(x) \\ \end{array}$. 
But, in high school textbook, as well as undergraduate textbook, a function is defined just by a formula, $y=x^2$ or $y=\sin(x)$. The domain is seldom part of the definition, but something the student has to compute, hence seen as an inherent property of the formula.  
The codomain is, as far as I know, almost never mentioned.  Most textbooks focus on the range.  Since the range is the smallest possible codomain, I guess it may be for "economical" reasons, but it seems to me that it leads to me to misconceptions about functions.  It also leads to shocking sentences like "the function is one-to-one, so it has an inverse" :(. 
My question : what the pros and cons of not teaching the notion of codomain of a function? 

A:

Pros: People will potentially better understand ideas required for fairly abstract mathematics. 
Cons: It pretty much doesn't matter to any field outside of pure mathematics.   It would add to an already fairly gigantic list of things that we need to teach at the high school level.   It is a pretty abstract concept to teach. 
In general, range gets the concepts across well enough that if a student goes on to study mathematics in college they should be able to modify their definitions to include co-domain and properly apply it.   Most of the country will never need that in ever.   There's no reason to go beyond a basic overview of it at the high school level. 

A:

Codomain may be a relatively recent precision of the language. 
You're interpreting "range" as only meaning the image, but "range" has also been used to mean the codomain.  according to a couple of cites here: http://en.wikipedia.org/wiki/Range_%28mathematics%29 .   
I agree it can be troublesome when the books are not carefully distinguishing these ideas.   However, many students will be tasked with domain and range concepts from pre-algebra courses when their knowledge of functions is usually limited to discrete cases or linear real-valued functions.   In later courses, students will see and write things like $\frac{x^2}{x-1}$ is a function from $\mathbb{R}\to\mathbb{R}$.  This kind of serves as describing the function as "real inputted" with the origin set, and it provides the codomain explicitly.   (Students are usually tasked to find the domain (meaning pre-image) and range (meaning image)). 
A source of these confusions may be that the codomain is so often $\mathbb{R}$, that it is deemed automatic. 
One way to tease out the difference with a class is to discuss the function of $student \to birthmonth$.  Here you can say that the domain is students in the class (noting that you, the teacher, is not an element of the domain).   The codomain is the set of twelve months.   And the image is the actual set of months acquired, which may not be the entire codomain. ( best if your students don't cover all 12 ;)

