No matter how good you are, a potential client could choose to work with someone else because they know them.
Nepotism and favoritism -- all words that mean preferential treatment. There is something very comfortable on being able to pick someone you know through someone else. If anything, it may turn out that if everything goes horribly wrong they can call you and tell you what a crappy choice they made to go with your pick. On the other hand, if everything goes right then you will end up looking like a star. People like go with a known quantity, even if you know that known quality may have an issue.
A few things to remember:
1. If you have gotten burned recommending someone, give them one or two more chances. And then don't.
2. If you know a prospect chose someone they favor, try to turn it into a positive. Find ways to become known to the prospect. They will eventually get to know you as well.
3. Being at the right place at the right time is everything. Don't rely on happenstance and get to know your client. Make it harder for them to go the easy way out by choosing a favored party. If you an, offer them an offer they cannot refuse.
4. Become the favored vendor -- be the one they choose because you are a known quantity. The more clients you do a good job for the better your chances for success.