What is the etymology of the word "function" (i.e. a map) in mathematics. How does (historically) the etymology of the word function relate to the mathematical definition and the mathematical concept of a function?
The word comes directly from Latin functio, which means performance or execution. See the entry in the Lewis-Short dictionary and also the entry for fungor, the related verb. In other words, a functio is the performance or execution of a task (a set of algebraic operations on a quantity, initially).
As far as I know it was Leibniz to use it (see Wikipedia and the term became popular with the Bernoullis and Euler, who introduced the $f(x)$ notation.