Geometric justification for the prime spectrum and "generic points" I realize there have been plently of discussions about this, but most of them are over my head and I never understand the geometric intuition behind them.
I'm trying to make a big list of "justifications" for using the prime spectrum of a ring. So far, I have two fairly pleasing formal ones:


*

*Preimages of prime ideals are prime ideal, so we have functoriality.

*The prime spectrum is the "free local ring" on a ring in the following sense: in passing from $\mathsf{Set}$ to the sheaf topos, we find that in terms of the internal language of sheaves over the prime spectrum, all rings are local.


These are formally satisfying but I don't have any feel for them. For instance, it makes sense that maximal ideals don't pull back to maximal ideals because points needn't pull back to points, however why should I expect irreducible varieties to pull back to irreducible varieties? I don't know topos theory so I don't know how or why $\mathrm{Spec}(R)$ falls out of the sky.
Now I'm looking for geometric justifications to look at the space whose points are prime ideals. The people I asked have all mentioned generic points; something along the lines of: "Instead of looking at particular points of a variety, we should really be studying a 'generic point' of each irreducible component, which only has the properties shared by all of its points."
I don't understand how prime ideals magically produce this vague notion... The ideal-variety correspondence simply says they corrspond to irreducible subvarieties, nothing more.
So, in painstaking detail, what are generic points and why is the prime spectrum the space we should be looking at?
 A: A point of a geometric object $X$ should be, up to equivalence, a morphism $P\to X$, where $P$ is a one-point space.  So we can approach this question by asking what kinds of one-point spaces we are likely to encounter in an algebraic setting.
Euclid defined a point as "that which has no part".  We can interpret this as follows: $P$ should be a locally ringed space such that any sheaf of ideals $\mathcal{I}\subsetneq \mathcal{O}_P$ that is locally generated by sections, is identically zero.  Otherwise, the zero set of $\mathcal{I}$ would cut out a nontrivial "part" of $P$.
With some thought, this implies that $P$ has only one point as a topological space, and its associated ring of functions is a field.  In other words, $P=\operatorname{Spec} K$, with $K$ a field.

To be clear, there is nothing very fancy going on here: I am arguing from abstract principles that the underlying topological space of $P$ should have only one point, which is intuitive.
Then the ring $K$ associated to $P$ should also have no nontrivial ideals.  This is less intuitive, but follows from the idea that the vanishing of a non-invertible element of $K$ should cut out a non-empty subobject of $P$.

It remains to classify morphisms $\operatorname{Spec} K\to \operatorname{Spec} R$.  Since the whole point of the spectrum is to make the category of affine schemes dual to the category of commutative rings, it is equivalent to classify morphisms $R\to K$.
But, with the right notion of equivalence, a morphism from a commutative ring $R$ into a field is just a prime ideal of $R$.
