ยง Why is the spectrum of a ring called so?

I've been watching Ravi Vakil's excellent "pseudolectures" on algebraic geometry, aptly titled AGITTC: Algebraic geometry in the time of Covid. In lecture 3, there was a discussion going on in the sidebar chat where a user said that the name "prime sprectrum" came from something to do with quantum mechanics. To quote:
letheology: spectrum of light -> eigenvalues of the hamiltonian operator -> prime ideal of the polynomial ring of the operator
I don't know what the prime ideal of the polynomial ring of the operator is, so let's find out! I got a somewhat incomplete answer on math.se Another user said:
Lukas H: I like the definition of Spec A that doesn't include the word prime ideal, by a colimit of Hom(A, k) where k run over all fields and the maps are morphisms that make the diagrams commute.
That's a pretty crazy definition. One can apparently find this definition in Peter Schloze's notes on AG. I got an answer for this on math.se