The answer is deceptively simple. Your attorney can help prevent concerns from turning into serious issues.
For example, two people want to start a business together. They pool their money and start making widgets. For a while everything is going well. Then one of the people decides they want to make doohickeys as well as widgets. The other person is happy just making widgets. What happens to the two people?
The answer is a lawsuit could occur because neither person knows how to resolve the dispute. However, if a lawyer had been brought in at the beginning to represent the company or multiple attorneys to represent each party the answer would be different. Lawyers are taught to ask questions and to look for worst case scenarios. Then lawyers seek to prevent those situations.
Take the same example, but with lawyer(s) involved. The two people want to start a business. The lawyer can suggest that instead of just starting a business, to incorporate and have shares to represent ownership interest. Now when one person has a significant problem with the direction of the company, the company can buy that person out. That widget may also be protected with a patent and if a person leaves, they could not get into direct competition creating the same widget. Additionally, trademarks could be created to identify the business that a person leaving the organization would not be able to use. There are several other ways potential issues could be defused with the inclusion of a lawyer at the beginning of a project.
On a personal level, the idea is much the same. A person has a dog, which they love very much. A lawyer can help that person draft a will bequeathing the dog to a close friend and providing enough money in trust to ensure care of the dog. If the person had not put together the will, the friend would not be given custody of the dog. Instead, the dog would go to the person's relatives. There is even the risk that a person may use a formulaic will and leave out those things the person feels are critical. The form cannot ask questions and would not be tailored to specific needs.
These are just two examples of many. It is the job of an attorney to help you avoid as many pitfalls in life as possible. Hire your attorney at the beginning of your project and you may find yourself in a better position in the future.