This question hits one of the most frequent misunderstandings about maximum and minimum properties of thermodynamic fundamental equations (i.e., the state functions that embody the whole information about the thermodynamic behavior of a system).
Sometimes, I hear uncontrolled statements like "entropy at equilibrium should be maximum." Without adding "maximum with respect to what," such a statement is either void of meaning or false. Consider, for example, what would result from characterizing thermodynamic equilibrium as the state that maximizes entropy as a function of the volume. Since $\left.\frac{\partial{S}}{\partial{V}}\right|_U=\frac{P}{T}$, the equilibrium would be possible only at zero pressure or at infinite temperature. It's a nonsense.
The correct statement of the maximum entropy principle is that the equilibrium entropy of a system at fixed volume, energy, and number of particles is maximum with respect to any additional variable expressing a possible internal constraint on the thermodynamic system when it is allowed to vary. For instance, such a form of the principle is used when the condition for thermal equilibrium between two subsystems is looked for.
in that case, one introduces the entropy of the combined system as a function of the total variables $U,V,N$ and an additional variable which is the energy of one of the two subsystems, say $U_1$. The resulting entropy for the total system is a function of four variables:
$$
S(U,V,N,U_1) = S_1(U_1,V,N) + S_2(U-U_1,V,N)
$$
The condition of extremum w.r.t. $U_1$ at fixed $U,V,N$ corresponds to the equality of the temperature of the two subsystems.
There is nothing special about entropy. It is possible to show that the maximum of entropy w.r.t. constraint variables at fixed energy, volume, and number of particles is equivalent to the condition of minimum of the internal energy $U$ as a function of the same constraints at fixed $S,V,N$. Moreover, such minimum principle for the energy can be translated into similar minimum principles for the remaining thermodynamic potentials (Helmholtz and Gibbs free energy, enthalpy), provided their natural variables are kept fixed.
A very terse discussion of such an issue is contained in the classical thermodynamics textbook by H. Callen.