There are a few reasons why it is important to hire someone who practices family law for a family law case. I know that a lot of people rely on their social network of friends and family to get a lawyer. I know a lot of people feel more comfortable with this. If you find an attorney you are comfortable with, that is great. That's important. However, if that attorney doesn't practice certain family law the majority of the time, they probably won't be able to spot all of the issues in your case that need to be addressed as well as they might otherwise have. Some attorneys will tell you this. Listen to them. Many attorneys are pressured into practicing something they don't usually, like family law, because a close friends referral wants them to be their attorney.
Trust is important, but it's not everything. You need trust in your attorney and you need that attorney to know the type of law you need. In family law, knowing the law means more than memorizing the statutes. It means knowing the case law and knowing the unwritten circumstantial standards. For instance, most practitioners in my field will tell you, certain counties are more apt to listen to younger children's wishes in regards to the parenting plan. This isn't written anywhere. It's something you learn by practicing the law.
You also need that attorney to know your judges. If they don't practice in this field often, they don't know the judges. One easy example for family law is marijuana. If you have a family law case and children are involved and you or your spouse (or the parent of your children) smokes marajuana, you are going to see widely disparate results with different judges. The same goes for maintenance. If your attorney knows their judges, they can pass on the first assigned judge and ask for another. This can be a real help for your case on polarizing issues where discretion for the judge is high.