PlatformIO uses chain+ mode for library.properties dependencies. It means,
Parses ALL C/C++ source files of the project and follows only by nested includes (
#include ..., chain…) from the libraries. It also parses C, CC, CPP files from libraries which have the same name as included header file.
#include <DHT.h> does not include any dependent headers. I’ve just checked the source code of the DHT library and found DHT_U.h. This file includes #include <Adafruit_Sensor.h>.
The working code will be:
#include <Arduino.h>
#include <DHT_U.h>
void setup() { }
void loop() { }