Why is it so surprising? Humans can make compilers that are better coders than they themselves are.
Then pick a smaller organic brain which doesn't have the ethical problem.
The closest we would know about how to teach a honey bee calculus, is to train an LLM, then stick around a billion tiny electrodes into the honey bee and do Hebbian learning to rewire it completely to match the LLM, which would likely completely erase anything the honey bee had learned, or it might not because we are missing something fundamental with Hebbian theory and (AFAICT, I'm not a neuroscientist) we don't all agree on what.