It probably could work of one assumes two equally smart devices on both ends, but USB always included shortcuts to allow the cheapest and flimsiest implementation (add a resistor between two pins) by garage shops building Phone chargers for 30¢/piece. And for them, its easy to mess around randomly, until their nonstandard non compliant junk means who-knows-what to a USB-C device.
So, your $300 headphones will pretty certainly work with your $800 iPhone, but plugging them into that $3 (including shipping) charger?