Yes I could have delegated that work to do manually by a junior lawyer ($300/hr) or had the dev work done by an IT analyst ($800/day) but in both cases I'd have then had the check the output very carefully (junior lawyer) or gone through the cost and delay of onboarding a dev.
Doing it myself was the best overall value for the client.
There is an ethical issue if the lawyer is not properly qualified to do dev work. You can get into hot water that way. I avoid it by working closely with my client's IT teams, so they can vouch for what I've done.
I'm not in law, but I do work with physicians and health care researchers who often need elaborate data analysis. I've found that there are some types of work that benefit immensely from having both coding and medical knowledge in the same brain, so to speak. This is usually when data is complicated and messy, and when the question a researcher asking isn't fully formed yet. The ability do complicated SQL, natural language processing, data formatting and cleanup, and so forth can end up shaping the question that gets asked. The process isn't always straightforward - researcher thinks of the question, asks the programmer to do the coding, programmer gets the answer back to the researcher.Yes, sometimes it works to describe what you want from a dataset to a programmer, but this often isn't the case for very interactive investigation of data sets. For this reason, I actually would highly recommend learning to code for some health professionals and researchers.
Now, there's a limit to what one person can learn to do, and there comes a point where it's not reasonable to ask people to be expert in multiple fields. Even when a researcher is pretty skilled at programming for data analysis, the moment will eventually arrive where the medical researcher needs to work closely with a programmer (who has very advanced data analysis coding skills). But even then, I've found that researcher often wouldn't have conceptualized the question that gets asked without possessing at least intermediate level data analysis skills (including SQL, Unix, Python or R like languages). I've also noticed that researchers who possess these intermediate+ level skills are far more effective at working with programming specialists whose main skill set is processing data.
I'm not sure if this comes up as often in law, but I wouldn't be surprised if poring through very large data sets for discovery might be one scenario where this happens.