The history there, I think, is that the temporary underlining functionality was initially added to display text composition ranges when using IME input on Windows. We recently improved text input support on iOS, macOS, and Android, which means that this function is now called on those platforms too.