The bees have solved the problem of dividing a surface into regions of equal area with the least total perimeter (honeycomb conjecture) by trial and error. Are there any other examples of solutions of mathematical problems by biological evolution, or is there a field that studies this phenomenon?
This is conceptually similar to using a physical / mechanical approach (proofs), as described in The Mathematical Mechanic by Mark Levi.
I believe some machine learning algorithms are also conceptually similar.
One example, which I believe is fairly well known, is that various species of cicadas reproduce at periods of prime numbers (e.g., $13$ and $17$ for $2$ specific species) of years. As for the reasons for this, it's not completely known or understood, but Wikipedia's Predator satiation survival strategy section of their "Periodical cicadas" article says:
Another example is how the Fibonacci numbers occur in nature in various ways. The Science article at How are Fibonacci numbers expressed in nature? explains various cases in some detail, especially on the second page, including how this also applies to honey bees.