To understand the reason, please start by having a look at the datasheet for this sensor (attached with this article), and scroll down to section 7.
Just before the header for section 7, you will see this line:
If signal from DHT22 is always high-voltage-level, it means DHT22 is not working properly, please check the electrical connection status.
This information answers the question.
If there is a problem with the sensor, the data signal will be constantly HIGH because of the pull-up resistor, and this is something that the DHT library can use to detect the problem.