The reason you have to divide by the number of moles present is actually very straight forward but is not the easiest of questions to answer with much depth for a high school chemistry student, you need to have a pretty solid understanding of thermodynamics for it to really make sense, but I'll try. The reason has to do with how we define a system at equilibrium. A system is at equilibrium when it's Gibb's free energy is zero, which is the same thing as saying that each component of the system is at a 1M concentration. If your species of interest is not at a concentration of 1 molar, you have to do something to make it 1 molar in your equation(if you don't, the system will no longer have a Gibb's free energy of zero and by our definition of equilibrium, the system would no longer be at equilibrium). The easiest way to make a number become 1 is to divide that number by itself. and since it's a concentration you actually have to divide by the number of moles and multiply by 1L, which you don't have to do because we all know what happens to a number when you multiply it by 1. The point of this is to take into account the fact that the equations and properties of equilibrium are based on the ideal gas law. The ideal gas law works only if all the constituents of the system are at standard state, standard state being 1 molar. I hope this helped.