Why is the Planck constant an exact number with defined value?

Planck's constant relates two different types of quantities, namely energy and frequency. That means it is a conversion factor which converts the units of quantities from one form to another. If the units of these two quantities are separately defined, then one can use measurements to determine the value of the conversion factor. That value would then have some uncertainty due to the experimental conditions. That is what has been done before. However, recently it was decided to define the units of one of the quantities in terms of the other, by setting the conversion factor (Planck's constant) to a fixed value without uncertainty. It came about by the redefinition of the kilogram. Now it does not have any uncertainty anymore. The same thing was done for the speed of light some time ago.

Before May 2019, Planck's constant was not defined by an exact value and instead was measured experimentally to be $6.626069934(89)\times10^{−34}\ \mathrm{J\cdot s}$. However, it is worth noting what we mean in saying that this constant has a certain numerical value when expressed in certain units. In essence, when we measure a physical quantity, we are comparing to the value of some constant that has been declared as a standard, i.e. a unit.

When Planck's constant was measured experimentally, this meant comparing to the old value of the joule-second, which was, in part, defined based off the mass of a lump of metal in a vault in France. In other words, the quantity would change if the mass of the International Prototype of the Kilogram were to change. Because of this, it was generally recognised that it was not ideal to define units based on artefacts, that it is better to define units based on physical constants. However, up until recently, there wasn't a good way to define the unit of mass based a physical constant.

What changed recently was the development of the Kibble balance, which made it possible to measure Planck's constant with sufficient precision to define it to be an exact value. Now, you may be wondering how the uncertainty goes away, since measurements always have uncertainties. The answer is that this uncertainty gets shifted to the calibration of devices that make measurements in the units defined by Planck's constant, namely the kilogram. In other words, whenever you measure the mass of something in kilograms, you are indirectly comparing the mass to Planck's constant (combined with some other constants to get the dimensions right), and the uncertainty in Planck's constant propagates to the calibration of your balance.

This comes down to how units are defined. If you look at the definition of SI units, in particular the one for the kilogram:

Interim (1889): The mass of a small squat cylinder of ≈47 cubic centimetres of platinum-iridium alloy kept in the International Burueau of Weights and Measures (BIPM), Pavillon de Breteuil, France. Also, in practice, any of numerous official replicas of it.

This was how the kilogram was defined in the past. Note this is obviously undesirable. There's exactly one small squat cylinder of platinum-iridium alloy that qualifies as the definition. Not only is that intrinsically problematic (the replicas are not "official" so different people can end up with different kilograms), there are other problems: For example solids undergo sublimation and become gas. This process is extremely slow for solid metals, but the rate is still not zero. How is the kilogram to be defined then? Do we also have to specify the year?

The solution to this was to define the kilogram in terms of the Planck constant. Now that the Planck constant has an exact value, if its value "shifts" slightly, it's the value of the kilogram that actually shifts.