That is a factor but a relatively small one. Several US states have instituted limits on medical malpractice liability and that has had only a small impact on total healthcare system costs. It's often the patients themselves (or family members) who insist on trying every possible diagnostic test, and even with the growth of evidence-based medicine we still don't have clear clinical practice guidelines covering many of those situations.