When we are first taught functions , we are typically taught of them as maps between real numbers and we taught to think of them mainly as a mapping between elements. It seems intuitive to take this route as well because most of the functions we are familiar with such as the square root, square etc are defined as a general which can taken any element in the real number. Eg: $f(x)= \sqrt{x}$ , $f(x) = x^2$.
However, to lead to the ideas in analysis and topology, one must think of function rather as a mapping between subsets. Now, the initial idea of course is equivalent to this, but it is usually non obvious why this form is more useful. Yet, I have never seen this point being emphasized when functions are being taught early on.
Why is it so that this second way is not emphasized? Has there been any attempts to change into this alternate pedagogy for functions?