I hope my title somehow encapsulates my problem.
Let's say we have a 1-D Grid with the values 2,1,5,8,1,1. Imagine those values are of some physical quantity $\alpha$. The mean of this would be $(2+1+5+8+1+1)/6 = 3$
Now let's say we have some function $f(x) = x^2$, which computes another quantity $\beta$ out of the initial ones. When we put in our mean it yields $f(3) = 9$. So one could think that the total $\beta$ would be $6 \times 9=54$.
Now let's compute $\beta$ directly for each grid element and sum it up to get the total amount. $\beta_{total} = 4+1+25+64+1+1=96$
$96 \neq 54$.
Intuitively, I'd say 96 is the right result, but I'm kind of at a loss why the mean times the number of values fails.
What you are saying is the special property of linear functions. If $f(x)$ is not linear, the mean value of $f(x)$ will not be equal to $f(\bar {x})$ in general.