A Game-Theoretic Foundation for the Wilson Equilibrium in Markets