Java did make sense when swing was coming out, and for a product like LibreOffice write one run anywhere is a big factor.
I donโt know what the state of cross platform UI is these days outside of Tauri/electron, or if GTK works.
I agree that JVM isnโt horribly inefficient, but I think Javaโs design patterns are.