Revisiting the concept of chemical potential in classical and quantum gases: A perspective from Equilibrium Statistical Mechanics