Definition of pressure in Thermodynamics In Mechanics we define pressure as "the amount of force acting per unit area". It appears naturally in fluid mechanics where we consider a volume of fluid $W$ contained in a region filled with fluid and we ask about the force due to the rest of the fluid on $W$ accross its boundary $\partial W$.
Now, in Thermodynamics, pressure is defined by
$$P = -\dfrac{\partial U}{\partial V}$$
That is the rate of change of internal energy with respect to the volume. Now why is that? I mean, what is the motivation to define pressure in that way in Thermodynamics? If it's still force per unit area, what force per area are we talking about here? And where is this force applied?
In fluid mechanics, for instance, pressure is defined pointwise, that is, if $D\subset \mathbb{R}^3$ is the region of the fluid, then pressure is a field $p : D\times \mathbb{R}\to \mathbb{R}$ such that if $S$ is a surface in $D$ with normal $\mathbf {n}$ then the stress force accross $S$ at $a\in S$ is $p(a, t)\mathbf{n}(a)$.
So, $p$ is a force per area which we know where it acts and by whom it is applied. In Thermodynamics, however, it seems the pressure is the same for the entire system. So if we pick a thermodynamic system, pressure is a characteristic of the state of the entire system.
This confuses me, because I can't see what this thermodynamic pressure really is and why it is defined as the partial derivative of internal energy with respect to volume.
 A: The following are postulates of thermodynamics (Callen, Thermodynamics, 1st ed.)

I. There exist particular states (called equilibrium states) of simple systems that are chracterized by their internal energy $U$, their volume $V$, and the particle numbers $N_1, \dots, N_r$ of their components. 
III. The entropy is a monotonically increasing function of the internal energy $U$.

It follows that the internal energy $U$ can be written as a function of $S,V$ and the particle numbers $N_1, \dots, N_r$ and that therefore
\begin{align}
  dU = \left(\frac{\partial U}{\partial S}\right)_{V, N_1, \dots N_r}dS + \left(\frac{\partial U}{\partial V}\right)_{S,N_1, \dots, N_r} dV + \sum_{i=1}^r\left(\frac{\partial U}{\partial N_i}\right)_{S, V, N_1, \dots, N_{i-1}, N_{i+1}, \dots, N_r}dN_i.
\end{align}
Now, the question becomes, which of these terms has anything to do with pressure?  Well, suppose we accept that the first term can be identified as the heat transferred to a system during a quasistatic process and that we consider an adiabatic process during which the particle numbers $N_1, \dots, N_r$ are held constant, then we obtain
\begin{align}
  dU = \left(\frac{\partial U}{\partial V}\right)_{S,N_1, \dots, N_r} dV\, \qquad (\text{quasistatic, adiabatic, $dN_i = 0$}).
\end{align}
On the other hand, if $P$ is the pressure of a given system, and if it undergoes such a process, then it should be pretty clear on physical grounds that if there is no heat transferred to the system, and no change in particle number of any of its species, then the only change in energy that can occur is if the system does some work due to the fact that when its volume is changing, the pressure it possesses causes it to exert a force on its boundaries.  Furthermore, it's not hard to show (using some multivariable calculus and the definition of work from mechanics) that the work done due to this pressure for a given change $dV$ in the volume of the system is $PdV$.  It follows that along any quasistatic, adiabatic process with unchanging particle numbers, we have
\begin{align}
  P = -\left(\frac{\partial U}{\partial V}\right)_{S,N_1, \dots, N_r}.
\end{align}
Now simply note that every point in thermodynamic state space (namely every equilibrium state) lies on some such process, so that relation holds for every equilibrium state.
