This is a very polemic and sometimes frustrating issue. As a broker I represented buyer and seller on the same transaction a few times. Only 10% of my transactions fall in this category. I praise myself for being a honest broker and I would not compromise my seller or the final price in order to get a double commission. Unfortunately not all agents are like that and with the increase of multiple offers we are starting to see this happening more often. So many times I get calls about listings and the buyers tell me they want to go direct to the listing agent not only to make sure they get it, but also to get a better price. In a recent case there was a loft that sold for $370k and could have fetch close to $500k if the agent was not greedy and wanted to double end. While we still have more good agents than bad we have a few bad apples on our garden.
Just keep in mind that agents primary duty is to the seller and is very hard to represent two parties with the same fiduciary duty.