The general perception of being a lawyer revolves around the presumption that you are always going to have things under control. Now, a good lawyer is most definitely going to have the ability to keep things at a place where they are relatively easy to manage, but in spite of the fact that this is the case legal cases go sideways all the time. Being able to improvise can prove to be useful in a lot of ways since it would allow you to focus on things like making the most of your case even if something happens that you had not initially planned for.
Improvising can often be all about making the new evidence that the prosecution is presenting seem like it is against the rules. If you stall for long enough and make your opponents feel like they are not going to be able to get the result they wanted, you might even be able to think of an even better solution in this regard. Checking out the Carlson, Meissner, Hart & Hayslett, P.A. Yelp would show you that this law firm is full of lawyers who know just how to improvise to get the best results even if they are not aware of something that the prosecution might have up their sleeve.
You should try learning jazz music if you want to learn how to improvise. Musical improvisation is obviously rather different from legal improvisation, but teaching yourself the tricks involved in these kinds of things can often be all that you would need in order to get the results that truly matter to you as well as to your client which makes this kind of out of the box thinking truly worth it.