Maybe not all AIs, but LLMs benefit immensely from abstraction. They are trained on human code, and human code usually uses very high abstraction - so high abstraction is overrepresented in training data compared to low level implementations. It also drastically reduces number of tokens, and that has downstream effect of better utilization of context window and whatnot. We are not yet at the point where AI can use low-level code as building snippets the same way it can use high-level libraries; most likely we won't be for a long time.