I have a theoretical question about selling Office copies online. If you work in a company and a company gives 5 Office Proplus licences to every worker, is it illegal to sell the remaining 4 online? People contact me and I go to their house or connect via Teamviewer and install it for them for a price?
It feels the same to me as selling the used goods like a fridge or a TV or a computer hardware which is legal. Is there any difference between those examples and why?
Unlike say, a fridge, software is not technically physical property, but something given to you akin to a subscription like Netflix that can be cancelled or retracted at any time for ... usually, quite a few liberal reasons. If you're not supposed to share it per the terms of that subscription, then you should not be doing so.
As for Office, it is sold at a special discount under "site licenses" used in many companies - and often with conditions allowing a person to purchase a copy cheaply for themselves during their term of employment. This discount comes with the caveat that the keys are not for masse resale.
The quick and dirty: no. It's not legal, it violates the terms of your license, and you can't do it.
As stated twice now that would indeed not be an acceptable thing to do. Your employer has the right to grant you those licenses, for your personal use, as a user of the 365 system. You personal use means that you are personally using and operating them, and not selling them on.