Fitting of bearings - Heat and Shrink fit
To heat fit bearing onto a shaft, the shaft has to be bigger than the hole in the bearing. The interference between the shaft and the bearing is prescribed by the manufacturer of the bearing. it has to be inside a specific tolerance otherwise the bearing will be to loose on the shaft and will not rotate with the shaft.  If the shaft is to big, it will interfere with the clearances between the races and the rolling element that will result in premature bearing failure.

Normally, a bearing temperature of 150 F (83 C) above that of the shaft is sufficient. Unless otherwise specified, open bearings should never be heated to a temperature greater than 257 F (125 C). Extreme heat can cause the bearing's metallurgy to change, which can alter bearing dimensions and/or hardness

The same will be when a bearing has to fit into a housing. The housing has to be smaller than the outside diameter of the bearing. To fit a bearing into a housing we will cool down the bearing with liquid nitrogen.

Video
Press fit bearing onto a shaft and into a housing
 

Oil bath

Induction bearing heater

Hot plate bearing heater

Shrink fit with liquid nitrogen