It does not vary. The min to max range is specified to take account of type variations. If a transistor exemplar shows e.g. B=100 under specific condictions (like Vce=5V, Ic=1A, t=25°C), it will keep this current gain.
A transistor in operation heats or cools which affects its hFE.
A transistor in operation has a variable current which also affects its hFE.
Design a transistor circuit with enough base current so that it works with the minimum or maximum hFE for the varying conditions. Negative feedback is usually used.