Reason for the discreteness arising in quantum mechanics?
If I'm only allowed to use one single word to give an oversimplified intuitive reason for the discreteness in quantum mechanics, I would choose the word 'compactness'. Examples:
The finite number of states in a compact region of phase space. See e.g. this & this Phys.SE posts.
The discrete spectrum for Lie algebra generators of a compact Lie group, e.g. angular momentum operators. See also this Phys.SE post.
On the other hand, the position space $\mathbb{R}^3$ in elementary non-relativistic quantum mechanics is not compact, in agreement that we in principle can find the point particle in any continuous position $\vec{r}\in\mathbb{R}^3$. See also this Phys.SE post.
There are several forms of discreteness in quantum theory. The simplest one is the discreteness of eigenvalues and the associated countable eigenstates. Those arise similarly to the discrete standing waves on a guitar string. The boundary conditions only allow certain standing waves that nicely fit into the enforced region in space. Even though the string is a continuous object, its spectrum becomes discontinuous and is naturally labeled with natural numbers. Exactly the same thing happens in unbounded (from above) quantum potentials like the infinite well or the harmonic oscillator, where you also get discrete standing quantum waves. (Other potentials can generate both discrete and continuous eigenvalues at the same time)
Another reason for discreteness comes in with multi-particle systems. Quantum theory requires that a system that is realized in space-time contains a unitary representation of the symmetry group of space-time, the lorentz group. In fact, you can define a particle in quantum theory as a subsystem that contains such a group representation. And because you can't have any non integer fraction of a unitary group representation, you need to have an integer number of them in your total system. So the number of particles is also an (expected) discrete feature, and it plays a role when you talk about single photons for example, that are either absorbed completely or not at all.
And finally there is a form of discreteness that comes with quantum measurement. The measurement postulate says that the result of a measurement is an eigenvalue of an hermitian operator called an observable. Now the existence of discrete spectra for these operators is related to my first point (boundary conditions), but this one goes deeper. While the existence of a discrete spectrum of the energies of a system still allows all continuous energy values by superposition, the measurement outcome results in exactly one (often discrete) result. This is responsible for the discreteness of the beams in the Stern-Gerlach experiment for example. Why quantum measurement works this way is essentially an open question even today. There are some approaches to answer it, but there is no generally accepted answer that would explain all aspects convincingly.
If you want you can go back to Planck's derivation of the black body energy spectrum, otherwise known as Planck's law, as well as Einstein's use of Planck's work in his explanation of the Photo Electric Effect (which garnered him the Nobel prize) in order to first understand some of the experimental motivation. However, to understand the roots of quantum mechanics in atomic physics, one must go back to Bohr and Rutherford model of hydrogen. An Introduction to Quantum Physics by French and Taylor discusses the Bohr-Rutherford model of the hydrogen atom on page 24. This model was introduced around 1913 and Bohr provided two key postulates:
An atom has a number of possible "stationary states." In any one of these states the electrons perform orbital motions according to Newtonian mechanics, but (contrary to the predictions of classical electromagnetism) do not radiate so long as they remain in fixed orbits.
When the atom passes from one stationary state to another, corresponding to a change in orbit (a "quantum jump") by one of the electrons in the atom, radiation is emitted in the form of a photon. The photon energy is just the energy difference between the initial and final states of the atom. The classical frequency $\nu$ is related to this energy through the Planck-Einstein relation:
$$E_{photon} = E_i - E_f = h\nu$$
Which was described in Bohr's paper On the Constitution of Atoms and Molecules. These postulates are slightly dated in modern conceptions of electron motion, since we now understand things better in terms of the Schrodinger equation, which allows for an an extremely accurate model of the hydrogen atom. However, one of the key concepts Bohr introduced is the Correspondence Principle, which according to French and Taylor:
...requires classical and quantum predictions to agree in the limit of large quantum numbers...
This is a key ingredient in modern physics, and is best understood in terms of asymptotic analysis. Most modern theories connect to real observed phenomena at the large N limit of the theory.
Admittedly these are the practical origins of why we have quantum mechanics, as far as the reason nature chose these things, the answer might be very anthropic. We simple wouldn't exist without them. Dirac frequently pondered the question why and here was his answer in 1963:
It seems to be one of the fundamental features of nature that fundamental physical laws are described in terms of a mathematical theory of great beauty and power, needing quite a high standard of mathematics for one to understand it. You may wonder: Why is nature constructed along these lines? One can only answer that our present knowledge seems to show that nature is so constructed. We simply have to accept it. One could perhaps describe the situation by saying that God is a mathematician of a very high order, and He used very advanced mathematics in constructing the universe.
Despite several modern attempts to attack the more meta-physical aspects of this, and give them rigor, there is still no really good answer...as Feynman or Mermin said:
Shut up and calculate!