I do not consider this unethical as I always tell them up-front that I am doing this, and they are still getting this functionality. Several times I release the module under their name after as well (on Github and/or NPM), depending on their wishes.
As for the big players like Oracle, I am personally not a fan of the organisation but in their defence, they release plenty of open-source projects (Graal comes to mind: https://github.com/oracle/graal). And you know Facebook has a whole ecosystem they maintain in PHP, React, machine learning, etc. Their developers are paid to work on these projects. Google is the same way as far as I know.
So "maintaining for free" might not be completely free.