dBi is decibel above the gain of a isotrope antenna as a reference.

The isotrope antenna is a mathematical antenna with a radiation pattern of a perfect sphere.
From this background it is calculated that a dipole antenna has a gain of 2.15 dB referenced to the isotrope antenna.

dBi is used for mathematical purposes and by commercial guys who want to add 2.15 dB more gain to the antenna they sell :-)