Thermodynamics as limiting behaviors of statistics is generalized to arbitrary system with probability {\it a priori} where thermodynamic infinite-size limit is replaced by multiple-measurement limit. A duality symmetry between Massieu's and Gibbs' entropy arises in the limit of infinitely repeated observations, yielding the Gibbs equation and Hill-Gibbs-Duhem equation (HGDE) as dual pair. If a system has thermodynamic limit satisfying Callen's postulate, entropy being an Eulerian function, the symmetry is lost: the HGDE reduces to the Gibbs-Duhem equation. This theory provides a de-mechanized foundation for classical and nanothermodynamics and offers a framework for distilling emergence from large data, free from underlying details.Comment...