The I2CIO.cpp file has a refrence to the I2C library.
You must add a reference to the library in your main code in order for PlatformIO to pick up the libraries correctly. Just adding the library but not adding any code reference to it will break the build. This is known quirk and has been e.g. discussed as early as 2016 in Wire.h is missing and cause a simple program to not compile.
The alternative is to add Wire to the lib_deps expression of the platformio.ini.