Why plane and solid angles have units? I have learnt that the dimensionless quantities have no unit. Such as the refractive index have no unit. But plane angles and solid angles have their radian and steradian units, although they are dimensionless quantities. Could anyone explain to me why is that?
 A: 
I have learnt that the dimensionless quantities have no unit.

Whoever you learnt this from is incorrect . Clearly, dimensionless quantities CAN have units, as you have figured out in the case of angles.
Another example of dimensionless quantity with units is the relative abundance of particles which has units of ppm(parts per million) , ppb(parts per billion) etc.
A: From  Guide for the Use of the International System of Units (SI) (NIST site).

7.10 Values of quantities expressed simply as numbers: the unit one, symbol 1\ 
Certain quantities, such as refractive index, relative permeability, and mass fraction, are defined as
the ratio of two mutually comparable quantities and thus are of dimension one (see Sec. 7.14). The coherent
SI unit for such a quantity is the ratio of two identical SI units and may be expressed by the number 1.
However, the number 1 generally does not appear in the expression for the value of a quantity of dimension
one. For example, the value of the refractive index of a given medium is expressed as $n = 1.51 \times 1 = 1.51$.

On the other hand, certain quantities of dimension one have units with special names and symbols
which can be used or not depending on the circumstances. Plane angle and solid angle, for which the SI
units are the radian (rad) and steradian (sr), respectively, are examples of such quantities...

The rationale beyond units for dimensionless quantities is to keep memory of the quantity used as the denominator of the ratio. NIST and BIPM convention of allowing to use or not the symbol f dimensionless units is consistent with the original choice.
