Why did chemists develop the concept of molarity?
As away of expressing the number of moles of something in a given volume. Molarity is just moles per liter. So why do we have moles?
A mole is a certain number of atoms, ions or molecules. In the previous sentence, the keyword is number – a mole is not a weight or an amount of something, it is a number, it is a count.
Moles are important because atoms, ions, and molecules will react together in 1:1, or 1:2, 1:3, etc. configurations. That is, 1 atom of sodium will react with 1 atom of chlorine to make 1 molecule of sodium chloride. But different atoms weigh different amounts. Hence, if I weighed out 10 g of one type of atom and 10 g of a different type, I wouldn't have the same number of atoms in each 10 g. So, by expressing things as moles, we have the same amount of atoms. And molarity is the number of moles per liter.
I have better explanation, with some diagrams, here...