Remember that many times ability to perform is more important then the price of the offer. If the buyer can not perform and the house falls out of escrow due to it, there is an appearance that there is something wrong with the house and the seller could easily loose $25,000 because of it. Also there is a loss in value anytime a property is on the market over a certain amount of time.
If your offer was 25,000 higher, what was the appraisal value?
Because the other offer may have been higher than yours and maybe the home did not appraise, only to have the seller agree to a price concession.
Also if the agent and seller have a good idea of what the appraisal price is, and the buyer is offering more but does not appear to be able or willing to make up the difference if it does not appraise. it would be wise to not accept the offer.
Quite frankly many agents do not have confidence in the performance of other agents. I had a listing once where I found out a week before the property was to close the buyer had canceled their loan in order to shop for a better deal. You can not make this stuff up.
We as a lender make a business of helping agents and buyers get their offers accepted. What we do differently is that we will close the loan on time or with in 21 days, if not and it is our fault we will pay the per diem interest on the sellers existing note up to $215 a day. Having a guarantee on the table gives the sellers and their agents a lot more confidence that the loan will close.
On the surface one would not expect a seller to not accept the highest offer. There could be some reasons why a seller may have done so though.
1. The seller may have thought the house would not appraise and that your offer was not obtainable.
2. The other offer may have been all cash or as is and that may have been what the seller needed as they may have been in a hurry or there could have been some kind of problem with the house.
On the other hand it does sound like the agent was trying to make more money on the deal and cheated the seller out of the 25K. Of course if you were to notify the seller about that they would have a great law suit, you could also find out if the seller was made aware of your offer. If they were then there has been no wrong done. If the agent did not tell the seller about the offer you may wish to turn them into the CA Dept. of Real Estate who most likely will suspend the agents privilege to sell homes, as well as other penalties. The seller though may be able to get their money back. You may be able to make a claim for damages as well, being that the DRE will go in and find the agent guilty, however your claim is not as clear as the seller's.
Also I believe you can complain to the board of realtors who do not look kindly on this type of thing.