The rich theory we have about prime numbers is useful for systems we can model with integers, at which point those abstract statements become real statements about the system.
A lot of our technology has been intentionally made discrete by us because it is easier to think about, leading to the various applications here (cryptography, error correction, hash tables, data encoding).
A lot of the natural world is continuous, so it can’t be modeled very well with integers. However, many things do end up approximating discrete processes. Years and seasons give biological systems a discrete structure to hang onto, so you end up with the situation someone mentioned about cicadas, who use the divisibility properties of prime numbers to get a biological advantage. Small quantum systems also form discrete structures, so you occasionally get [situations where a physical structure reflects some fact about primes](https://physics.aps.org/articles/v5/s63).
In terms of all the times humanity uses prime numbers, though, by far most of it is in doing other forms of discrete math. We teach them in school because we as a society have decided it’s valuable for people to have some background in math, even if they don’t end up becoming mathematicians, and primes follow very closely when you have learned how to count and do basic arithmetic.
Latest Answers