When you consider that Windows has to keep backwards compatibility with applications from decades ago using whatever calls to Win32, to the point of keeping comments in the source code about why some call is done that way and shouldn't be changed then it's pretty fair that a company providing a platform wants to keep a tidy, secure (or at least following their guidelines for security/privacy concerns) public API.
The Java community had a huge debacle about `sun.misc.Unsafe`, it was a private API being abused by numerous libraries[0] and when its removal was announced there was a quite big backlash about its repercussions.
I don't think that Apple is evil because of its enforcement on private APIs, there might be other issues with this enforcement but there are very valid reasons to do it.
[0] https://blog.dripstat.com/removal-of-sun-misc-unsafe-a-disas...
>I bet Electron tried to access to them to draw web pages smoothly.
How is this not a direct advantage? If these uncommented API calls provide a better performing solution than anything a third party can make then that is a direct advantage. Apps with that call could have a longer battery life or just run smoother.