The numbers of elementary particles and their elementary charges are the ONLY conserved quantities. With their conserved charges, the particles cause radiations during their motions. The microstates consist of particle AND radiations. The Lagrange multipliers prevent the radiation of particles. The thermodynamics didn’t recover the connection between entropy on the one side and particles, radiations and Lagrange multipliers on the other side.
The symmetry comes out from the distribution of the elementary charges on the elementary particles and from the Lagrange density of the interactions.