it is legal in most states if proper notice is provided and it is standard practice typically to notify the “outsider” the agent has a fiduciary duty to represent whomever they are contracted with. It is also included in most Realtor offer to purchase documents.
It would not affect the ops situation though.
in fact, if an agent is double dipping (the local term for double ended deal), it doesn’t matter who he sells the home to. It’s simply that he is both the listing agent and selling agent. Not sure why the op believes it played a part in this situation.

