I downloaded raster data sets together with the legend qml files from the SoilGrids page (ftp://ftp.soilgrids.org/). Assignment of the qml legend (TAXOUSDA_1km/TAXN_WRB_1km) didn't work in QGIS 3, as the legend was discretized in floating-point numbers and not integers (to represent the xx unique identifiers of the raster). However, in QGIS 2.18. loading and proper assignment of the legend worked. Thus, I was thinking that this might be a technical issue of the new QGIS version, which could be addressed/solved in the future. Or is there another way to solve the problem in the legend/qml properties?
I would say it's a UX bug. QGIS 3 no longer has the load statistics button for auto scaling the legend. It does this automatically and overwrite the applied styling everytime you close the properties styling dialog.
In QGIS 3:
Go to layer properties > style. Now load the qml but before closing the dialog open "Min/max value setting" and select "User defined".