Why is entropy defined the way it is in classical thermodynamics? Entropy as defined by the Clausius statement in classical thermodynamics, is only defined for equilibrium states. 
I do not understand why is the definition restricted to equilibrium states. Would an unrestricted definition violate any of the axioms or laws of classical thermodynamics ? 
An example would be really helpful.
 A: According to the Clausius statement, the entropy of a state is dependent of the temperature of the system.
It is temperature in turn, that is typically only assigned to equilibrium states: the default thermodynamical equilibrium state is the Boltzmann-Gibbs ensemble in which temperature appears as an explicit parameter.
Is it always impossible to assign temperature to non-equilibrium states? One can generalize temperatures to non-equilibrium states as well. But the typical way to do that is inverting Clausius statement: writing T=-dE/dS. This means you need entropy first for doing this, it can be obtained from a statistical mechanics/information theory point of view (Boltzmann/Shannon entropy) 
A: The entropy of a given macrostate is given as $S = k \log \Omega$, where $\Omega$ is the number of ways of rearranging the microstates of the system that give you the same macrostate.  This is easy to define when you have a macrostate defined by parameters like $U, P, T, V$, etc.  But thermodynamic state variables like that are only defined for equilibrium states.
But, it's not critical that the macrostate be an equilibrium state, so much as you have a clear way of defining what you mean by "this macrostate".  Once you have done that, you can always apply the Boltzmann definition of entropy, above, and from that, find the entropy.
A: The Clausius statement does not define entropy in classical mechanics; it is simply a very specific special case of the much more general Second Law.  Entropy is defined by the Boltzmann, or more generally the Gibbs, entropy formulas.
