Are they used to calibrate the humidity readings or something like that? I tried using both humidity sensors at once and they are off to each other by 10 %RH, is this normal?
There may well be some hints in the documentation, for example:
The heater is intended to be used for functionality diagnosis: relative humidity drops upon rising temperature. The heater consumes about 5.5mW and provides a temperature increase of about 0.5-1.5°C.
and for the SHT31 (link to manufacturer's datasheet, rather than some dubious site that accumulates datasheets of various ages.
4.10 Heater The SHT3x is equipped with an internal heater, which is meant for plausibility checking only. The temperature increase achieved by the heater depends on various parameters and lies in the range of a few degrees centigrade. It can be switched on and off by command, see table below. The status is listed in the status register. After a reset the heater is disabled (default condition)
In general if you don't find information in the datasheet that is adequate, look on the manufacturer's website for application notes, and for evaluation modules and the associated documentation.
Without a heater it would be impossible to measure the RH near 100%. As the air (gas) humidity can never be beyond 100% RH, when heated the RH drops, so now it is possible to measure it, otherwise it would be liquid (near 100% RH).
Actually the heater adds some bias. You should use a Mollier diagram and temperature to get the absolute humidity from RH and T. Then you add the \$\Delta T\$ of the heater to get new RH value (absolute remains the same).