You could redefine "prime" to include 1 if you wanted to without changing the fundamental truth of important results about the natural numbers. It would just mean you'd have to phrase many of them in a slightly more roundabout way, e.g. with "suppose x is a prime number not equal to 1" needing to appear in key theorems where before "suppose x is prime" sufficed. (Perhaps some other theorems might be more concise, although I'd be surprised if there were a net benefit -- the community has probably had this debate a bunch of times before settling on the current consensus.)
Definitions are chosen to be convenient for the purposes of communication, there's nothing inherently true or false about them. An argument for one definition being better than another might involve demonstrating that mathematical results people care about can be stated more clearly, concisely and efficiently using your alternative definition. The recent tau vs pi controversy providing an amusing example :)
You could refactor "prime" to allow 1, provided you refactor all the call sites to work with that new definition too. Consensus seems to be that this refactoring would add LOC and reduce code readability, probably leading to someone submitting a patch soon after with a "prime-but-not-one" function and using that everywhere.
Do remember that math is a bunch of rules that are made up by people to capture certain abstract concepts, and to understand patterns and relationships between those abstract concepts. So although it might feel like a "kludge" to you, that's just the way math is. You can make up whatever rules you like, and some rules exclude "inconvenient results", leading to a deeper understanding, and thus are more widely adopted by other mathematicians.
Within this ring, the integers are divided into four sets: Zero, a (unique) value which when multiplied by anything yields itself; the Units {1, -1}, which are the elements with multiplicative inverses; the Primes {2, 3, 5, 7, ...}, which are the elements which cannot be written as the product of two non-Zero non-Units; and the Composites {4, 6, 8, 9, ...} consisting of everything else.
Units could be considered primes. It would make some things more convenient and others less convenient. For example, a prime decomposition of an element would really be a prime decomposition and not "up to a unit"; on the other hand, a proper statement of its uniqueness would be more bulky.
Ultimately mathematicians decided that it's much more convenient to not consider units to be prime. It does seem to be a matter of convention, with no deep significance to it.
Javascript: function q(n,k){ var t = 0; for( var j = 2; j <= n; j++ )t += 1/k - q(Math.floor(n/j),k+1); return t; } function p(n){ return q(n,1) - q(n-1,1);}
If you check out values of p(n) for n = 1...16, you'll see you get 0,1,1,.5,1,0,1,.3333333,.5,0,1,0,1,0,0,.25
So notice what p returns here - if n is prime, p(n) is 1. If n is a prime power p^a, its 1/a (hence 16 = 2^4 -> 1/4).
And if n is 1? Then p(n) is 0.
In fact, q(n,1) is a tidy (but slow to compute) expression of the Riemann Prime Counting Function: http://mathworld.wolfram.com/RiemannPrimeCountingFunction.ht....
This doesn't prove anything about the "definition of prime numbers", of course - definitions are social things. But 1 does behave differently from the primes in this function that seems to do nothing at all but explicitly identify primes.
Nothing rigorous here, of course, but I think it's a fun, quick-to-code-and-play-with example.
[1]: https://cs.uwaterloo.ca/journals/JIS/VOL15/Caldwell1/cald5.h...
In a number theory course around 1990, I remember reading papers from the 60s which would explicitly note whether the counts of primes that they were using were starting from 1 or 2. You can define them as not notable mathematicians, but working mathematicians in number theory still had not completely standardized 50 years ago.
Now for more fun, sit down with a group of mathematicians and ask whether they consider 0 to be a natural number. :-)
(The answer you get will vary by field. But none will consider it a particularly important question.)
However the last vestiges of the question about what definition was most natural didn't get settled until surprisingly recently.