Observations of stable mainly dipolar magnetic fields at the surface of ~7% of single hot stars indicate that these fields are of fossil origin, i.e. they descend from the seed field in the molecular clouds from which the stars were formed. The recent results confirm this theory. First, theoretical work and numerical simulations confirm that the properties of the observed fields correspond to those expected from fossil fields. They also showed that rapid rotation does not modify the surface dipolar magnetic configurations, but hinders the stability of fossil fields. This explains the lack of correlation between the magnetic field properties and stellar properties in massive stars. It may also explain the lack of detections of magnetic fields in Be stars, which rotate close to their break-up velocity. In addition, observations by the BinaMIcS collaboration of hot stars in binary systems show that the fraction of those hosting detectable magnetic fields is much smaller than for single hot stars. This could be related to results obtained in simulations of massive star formation, which show that the stronger the magnetic field in the original molecular cloud, the more difficult it is to fragment massive cores to form several stars. Therefore, more and more arguments support the fossil field theory.