It happens - indeed it happened to me a few years back. I was part of a business that was asked to pitch a system specification to solve a particular business problem. We worked hard on the spec and felt sure we had covered all the bases - well we must have done because the business we pitched handed the whole thing over to their "preferred supplier" and asked them to build it - just as we specified it.
Lessons were learned. No more free consultancy. We got much more cautious about pitching to new prospective customers and made sure that any specifications were high level and trod carefully around key technical issues.
The thing to do in the pitch is to demonstrate that you understand the problem space thoroughly, i.e. rather than pitching the solution, pitch yourselves as the best people to discover and implement the solution.
I too have worked at a company that learnt this the hard way.
Pitch for free, spec for pay. Doing business analysis is delivering significant value to the client, and you can sell that in particular. You are delivering a spec that's implementable, no matter by who. You're obviously the best for the job, but it's no skin off your back if they go with somebody else, everybody gets something, and gets paid.
Like trying too hard for that love interest that's out-of-your-league ... it's probably natural for people exposed to "big opportunity" for the first few times to try to oversell themselves ... and in the process give away the store to a business that's already demonstrated (by its big suc-cess) that it plays hard-ball.
Too bad it takes hard knocks to get past the star-struck stage. To quote Rodney, "It's a jungle out there!"
Lessons were learned. No more free consultancy. We got much more cautious about pitching to new prospective customers and made sure that any specifications were high level and trod carefully around key technical issues.