Buyer's Agents are "free". Free means you don't have to pay them, but of course they do get paid to help you. Listing Agents represent Seller's and agree to the commission. The vast majority of San Francisco homes are sold with a Buyer Agent representative, so Listing Agents know to advertise a certain commission to Buyer's Agents to encourage them to bring their Buyers. Some naysayers still see this as a conflict of interest with Buyer's Agents trying to push Buyers to buy. Certainly, there are those kinds of agents, but most Buyers of any product can usually see the sleazy, untrustworthy, "sales" guy/girl a mile away. Plus, you should sign a "Buyer-Broker" agreement which spells out your Agent's duty to you. If you don't sign the agreement, your supposed representative is actually legally representing the Seller. This can be a problem.
But the real problem is with the Listing Agent who is DEFINITELY representing the Seller's interest over yours. If you run into a Listing Agent who says "don't worry, you can just write the contract with me", you ought to be smelling something fishy. He/she is just trying to make both ends of the commission, and/or will likely skew all data, information, and reports in favor of a higher sales price, and other things that favor the Seller. I've seen properties that have sat on the market for 3 months sell for the "asking" price intead of below it when a Buyer came along who was represented by the Listing Agent and not their own representative. A good Buyer's Agent knows a "stale" listing is ripe for under-bidding.
A good Buyer's Agent can do so much more for Buyers, but at the very least, since the cost is "free", and Listing Agents care about you second, if at all, you ought to find a good agent as early in your home search as possible.