"You are using the word "function" in at least two different ways. It might confuse students. There are biological or mechanical functions and computer software functions -- all involving actions of some kind, be they actions of electrons, molecules, cells or larger parts in the physical world -- and there are mathematical functions that are abstract relationships between two or more sets of objects. (And others, I'm sure.)"
That's right - and from there one can go on and muse about how and why the math meaning of the word "function" has become so abstract and inert. Further, one could ask whether that "level/type of abstraction" has useful counterparts in the world of practical software development and engineering.