Customer service. I have had the same real estate agent since 1997 and have done four transactions with her during that time. All have been in the same local area, which she knows extremely well. The in-depth knowledge of the community, how a house will resell after you bought it, the unwritten history of some of the homes comes into play. Additionally her helpful tenacity got a house sold under very difficult circumstances that I thought made the sale impossible.
Granted, this might be rare, but the lesson for the real estate agents is that customer service can give them an edge in competitive environments.
And while that commission might look rather large, the last time I bought a house we looked at something like 20 houses, so you need to figure that into the agent's cost.