Is there a reason for the mathematical form of the equilibrium constant?
Equilibrium is also the state in which the forward and reverse reactions are proceeding at equal rate. Consider a hypothetical reaction 

$$\ce{aA + bB} \overset{k_1}{\underset{k_{-1}}{\ce{&lt;=&gt;}}}\ce{ cC + dD}$$

If we assume that the forward and reverse processes are elementary reactions (a big assumption), then:

$$rate_1=k_1 [\ce{A}]^a [\ce{B}]^b$$
$$rate_{-1}=k_{-1} [\ce{C}]^c [\ce{D}]^d$$

At equilibrium:
$$rate_1=rate_{-1}$$
$$k_1 [\ce{A}]^a [\ce{B}]^b=k_{-1} [\ce{C}]^c [\ce{D}]^d$$
$$\dfrac{k_1}{k_{-1}}=\dfrac{[\ce{C}]^c [\ce{D}]^d}{[\ce{A}]^a [\ce{B}]^b}$$

The ratio of the rate constants is the equilibrium constant:

$$K=\dfrac{k_1}{k_{-1}}=\dfrac{[\ce{C}]^c [\ce{D}]^d}{[\ce{A}]^a [\ce{B}]^b}$$