Very often they want to own all the code, so you cannot just abstract things in your own engine. It then very easily becomes the pragmatic choice to just use existing libraries and frameworks to implement these things when the client demands it.
Especially since every client wants different things.
At the same time, even though there are libraries available, it’s still work to stitch everything together.
For straightforward stuff, AI takes all that work out of your hands.