This is wrong. Humans discovered prime numbers. They are not an invention. They fall naturally out of the integers, and would exist regardless of whether humans did or not. Prime numbers are are some of the most fundamental objects in all of mathematics, and the fact that you can find them on diagonals in these graphs probably indicates a pattern that we can't explain yet.
I agree that some mathematical objects are "more fundamental than others"; primes are probably among the most basic.
If you're interested in the ontological status of mathematical entities, and the process and meaning of mathematics, check out "The Mathematical Experience" by Davis and Hersh,
It's also such a universal constant that some sci-fi stories or movies (eg, Contact (1997)) use them as a tool to indicate an intelligent civilisation. In other words, transmit 2 blips, 3 blips, 5 blips, 7 blips, and it soon becomes clear it's not random - it's a list of primes.
The question of whether math is invented or discovered is far from settled. I know next to nothing about math, but a quick google search for "math created or invented" brings up so much controversy I find it unlikely that it's been decided. See Mathematical Platonism and its Opposites by Barry Mazur (p. 19 in: http://www.ems-ph.org/journals/newsletter/pdf/2008-06-68.pdf). He says it's The Question that won't go away.
Indeed. Further, at the risk of soun
ding too phiosophical, this invention/discovery, Platonist/constructivist debate hinges on the fundamental notion of existence. And, as with most fundamental notions, the obvious soon ceases to be so.
By that reasoning, all ways of grouping, analyzing, and considering numbers are discovered. And those ways are infinite. That primes are important is of our choosing.
There are a number of practical social situations where an understanding of divisibility can be useful.
For instance, say a group of social animals of equal rank stumble upon some berries and split them amongst themselves. It would be beneficial for them to understand that if the number of berries is relatively prime to the number of them, then an even distribution is impossible and they should accept that.
I'm sure more compelling examples of grouping in social animals arise all the time. Now if these animals begin to study numbers abstractly, one of the first things that they will practically need to understand is the rules that govern groupings. This will lead them immediately into the idea of prime numbers (and by extension relatively prime numbers).
I can't really think of a technique of grouping or looking at numbers that wouldn't at least implicitly require prime numbers.
It may be that higher level analysis of primes (like in this article) is somewhat artificial, but I'd maintain that the idea that a number is prime, or at least the concept that two numbers are relatively prime, is one that is fundemental to having any understanding of a number system.