We briefly review the connection between statistical mechanics and thermodynamics. We show that, in order to satisfy thermodynamics and its Legendre transformation mathematical frame, the celebrated Boltzmann-Gibbs (BG) statistical mechanics is sufficient but not necessary. Indeed, the N → ∞ limit of statistical mechanics is expected to be consistent with thermodynamics. For systems whose elements are generically independent or quasi-independent in the sense of the theory of probabilities, it is well known that the BG theory (based on the additive BG entropy) does satisfy this expectation. However, in complete analogy, other thermostatistical theories (e.g., q-statistics), based on nonadditive entropic functionals, also satisfy the very same expectation. We illustrate this standpoint with systems whose elements are strongly correlated in a specific manner, such that they escape the BG realm.