Are they? I thought they were a basic element or fact of nature, that we just found an easy way to represent mathematically...?
Are numbers a fact of nature? You can count things, sure, but you'd never find just an idea of some number lying around. It's just as much of abstraction and tool as language or writing. The debate about maths (and, by extension, its study subjects like numbers) being invented or discovered is still ongoing.
Philosophy aside, primes are just natural numbers that were observed to have some interesting property. Apart from being building blocks for numbers and them popping up everywhere in mathematics, there wasn't that much real-world use for them until the advent of modern cryptography (the 1970s or so). That's despite the fact people knew about and studied them since at least the times of Euclid.
Like E=MC2... it is just a mathematical expression of a physical property.
Fun and related to this thread story: classical electrodynamics, as formulated by Maxwell's equations, was compatible with special relativity good 40 years before special relativity was a thing. Even gave enough of a framework to derive Einstein's SR from them. It 'just' took someone pondering the right things to make it into its own thing.