I didn't misunderstand. I never said the listing agent and selling agent were the same person - they can be where a listing agent sells one of their own listings, but in most cases the selling agent is different from the listing agent.
A common buyer misunderstanding is because a buyer asks a real estate agent to assist them in obtaining a property, the Agent is representing the buyer and their interests. Unless the buyer and the real estate agent have contracted for representation by both signing a Buyer-Client Service Agreement, the real estate agent is representing the seller.
The agent who is showing homes to the buyer shows homes where the agent is also the listing agent and homes listed by other agents. If a home sells, the listing agent gets 1/2 the commission and the selling agent gets the other 1/2.
Around here, typically both agents represent the seller. Many buyers have the misconception that because they have developed a relationship with an agent and the agent has shown them houses that the agent represents the buyer. Buyer agency agreements are provided for in the law but are rare in our area.
Also see REALTOR.com: Who Represents You?