I will be teaching my students about functions, and want to stress that functions are not only the usual mathematical ones (linear, logs, exponential, ...), but that function is fundamentally a logical concept, and so that functions abounds not only in mathematics and nearby fields such as computer science, but can be found everywhere. I have some specific examples in mind, but will give them as answers, after waiting some hours to see what else people can come up with. I want a really big list, functions are everywhere, really!
Also, I want more than functions. We use functions to represent/model some very specific kind of relation between things of varied kinds, so I also want examples of relations from outside mathematics, with explications of why they cannot (or can) be modelled as functions.
I will start out with the process of solving equations. Let us start with what we everybody learns in elementary school, to solve linear equations like $$ 5x-3=6 $$ We are told (I jump over the explications here...) that we can move the 3 over to the other side of the equals sign, but we must then remember to change its sign: $$ 5x = 6+3 $$ and then we can "move the factor 5 over", but we must then remember to divide, not multiply.
Later, maybe much later, we understand that the process is really to "do the same thing/operations on both sides of the equals sign", and then the equality will be preserved. Now, being much more advanced, we think that the "operation" we are applying on each side is the application of a function, and might be satisfied with that.
But this is too simple! it is easy to do the same on both sides, and then finding that it was not really a function at all!
So let us be systematic. Write our equation symbolically as $$\tag{1} x = a $$ Denote "what we do on both sides as $R$ (think Relation or Rule): $$\tag{2} R(x) = R(a) $$ We want to be sure that the solution set of (1) is the same as the solution set of (2). To be sure that a solution of (1) also is a solution of (2), $R$ must preserve equality, that is, $R$ must be a function. Thats the basic requirement in the definition of a function. We call that "the principle of preservation of equality". The other way, to be sure a solution of (2) also is a solution of (1), $R$ must be injective (but it does not need to be a function, the definition of injective makes perfect sense for relations too). This is "the principle of preservation of inequality". An example of a non-function relation that is injective is the relation consisting of all the pairs $(x, \sqrt{x}), (x, -\sqrt{x})$ where $x$ ranges over non-negative numbers. An example where one can stumble upon "doing an operation" which turns out not to be a function is when trying to solve a congruence equation (incorrectly): $$ 2\cdot 7 x \equiv 2\cdot 9 \pmod{12} $$ and just cancelling the factor 2 on both sides. That is incorrect, because 2 is a nulldivisor $\pmod{12}$. So that process do not define a function, but it does define a relation.
So, I am also interested in relations from everywhere, since in discussing equation solving one cannot really avoid them. And, a last question: where can I find (published) a discussion of equation solving, in general terms, along the lines above?
Here are some things that I use as function examples for a general set of functions:
(1) Letter counting function, $L$. Domain: Set of words. Letter counting function outputs number of letters: E.g., $L($dog$)=3$.
(2) Initials function, $I$. Domain: Set of students in class. Initials function outputs first and last name initials: E.g., $I($Mary Jones$)=$MJ.
(3) Full sibling (two bio parents in common) relation, $S$: For people $a, b$ we have $a S b$ if and only if $a$ and $b$ have both bio parents in common. (Variants are possible: at least one bio parent in common; exactly one bio parent in common; etc.)
I'm sure others can add many other ideas to this list.