How are the molar mass and molecular mass of any compound numerically the same? This observation is really annoying me, and the internet isn't providing me with any solid answers. Either their definitions of molar mass completely differ, or they don't stick to their own definition while actually calculating the molar mass of a certain element or compound. 

Now, according to Wikipedia, 


  The molar mass M is a physical property defined as the mass of a given
  substance (chemical element or chemical compound) divided by the
  amount of substance.


and it's unit is 


  g/mol


My understanding of this is that we're calculating the total mass of all the atoms(or molecules) present in 1 mole of that element(or compund). This means that we would have to take the atomic mass of that element and multiply it by the number of atoms present in 1 mole of that element, which is 6.022 × 10^23 atoms.

So for example, the relative molecular mass of water is 18.02 u, and it's almost the same as the molar mass of water, which is 18.015 g/mol.

So my question is, how is 18.02 u × (6.022 × 10^23) = 18.015 g/mol?
So for example, the relative molecular mass of water is 18.02 u, and it's almost the same as the molar mass of water, which is 18.015 g/mol.
  
  So my question is, how is 18.02 u × (6.022 × 10^23) = 18.015 g/mol?


That is not quite correct.

The relative molecular mass $M_\mathrm r$ of water is a dimensionless quantity, i.e. the unit for relative molecular mass is the unit one and not $\mathrm u$:

$$M_\mathrm r=18.015\,28$$ 

It's the average mass per molecule $m_\mathrm f$ that has the unit $\mathrm u$:

$$m_\mathrm f=18.015\,28\ \mathrm u$$

Note that

$$1\ \mathrm{u}=1.660\,538\,921(73)\times10^{-27}\ \mathrm{kg}$$

Also note that you are missing the unit of the Avogadro constant:

$$N_\mathrm A=6.022\,140\,857(74)\times10^{23}\ \mathrm{mol^{-1}}$$

Thus

$$\begin{align}
M&amp;=m_\mathrm f\cdot N_\mathrm A\\[6pt]
&amp;=18.015\,28\ \mathrm u\times N_\mathrm A\\[6pt]
&amp;=18.015\,28\times1.660\,538\,921\times10^{-27}\ \mathrm{kg}\times N_\mathrm A\\[6pt]
&amp;=18.015\,28\times1.660\,538\,921\times10^{-27}\ \mathrm{kg}\times6.022\,140\,857\times10^{23}\ \mathrm{mol^{-1}}\\[6pt]
&amp;=0.018\,015\,28\ \mathrm{kg\ mol^{-1}}\\[6pt]
&amp;=18.015\,28\ \mathrm{g\ mol^{-1}}
\end{align}$$