There is social commentary all throughout the play As You Like It. It starts with the interweaving of the athletic competition (the wrestling) with the court politics. Linking those two so directly essentially allows Shakespeare an embodied metaphor: social life, especially court life, is a dishonest struggle.
The contrast between the two settings is both social commentary and evidence of a historical influence on Shakespeare from without; the ideal of a pure setting in the country vs. a corrupt court or city setting was very old even in his time. Add to this the upset of the Duke living in the forest and we get a commentary on social life that is out of balance.
Jaques' famous "All the world's a stage" speech indicates a sophisticated, even cynical, philosophy on life that allows a gap between how things are and how they seem. Rosalind's disguise underscores this, but gives social weight to why someone, especially a woman, might need to be other than she appears.
Finally, since the play involves a renewal of society from a fallen state, it is considered a Christian play.