Because it's not the case that the pharmacist is automatable. A small fraction of the work is completely un-automatable and the easily automatable stuff is just busy work. Even if you automated it they'd still have to hire a pharmacist, he would just have less to do.
Drug interactions are not a lookup. Some people have problems some do not. We don't even have interaction data on all possible combinations of two different drugs, much less all the 6+ different drugs that some people are taking. There is a lot of "Educated guesswork".
For someone only taking one drug for a couple weeks and the a year latter a different drug for a few weeks it is easy.
Seems like there would be the possibility of WFH pharmacists whose job is to do the educated guesswork on any newly observed combo. Log it into the system after some validation and voila we have timeless knowledge for all who come later, automated at low costs.