It sounds like "highest and best" was called before your offer was submitted. I have had this happen before. A conscientious listing agent will inform buyer's agents when they have submitted an offer after the highest and best call, though they are under no obligation to do so. It is hard when you find a house you like and you miss the opportunity, but don't despair as another one will come along. Probably one you will like even better! Avoid the temptation to measure all other houses against the one you lost. Good luck!