"The answer is sometimes. This is from the Microsoft Word EULA:
Transfer to Third Party. If you are the person who initially licensed the Software, you may make a one-time permanent transfer of this EULA, Software and Certificate of Authenticity (if applicable) to another end user, provided that you do not retain any copies of the Software.
This clearly states that transfer is allowed. Other packages will be different. AutoCad, for example, has a very restrictive transfer EULA.
I see the bigger issue is that the seller may not have rights to transfer the license. Some software companies claim that the 'discount' seller is not an authorized reseller and therefore the transaction (and license transfer) is not valid.
This depends very much on the jurisdiction; there is no globally valid answer.
The core point is that software is never sold, always licensed. Software companies generally try to make these licenses as restrictive as possible, but many countries have laws that make such restrictions invalid, especially when they involve end users (because allowing arbitrarily nasty hidden license terms would cripple daily business operations).
I know that, for example, German law basically allows the resale of software licenses, no matter what the license terms say, even if done commercially. I'm pretty sure it's different in the USA, and different again in the UK."