Tools are constraints and time/token savers. Code is expensive in terms of tokens and harder to constrain in environments that can’t be fully locked-down because network access for example is needed by the task. You need code AND tools.
It's also true for human. But then we invented functions / libraries / modules