It's a problem for thousands of teenage boys and punchline fodder for every teen comedy. As boys go through puberty their voices begin to unexpectedly crack.
The reason for this is pretty straightforward, as the Today I Found Out YouTube channel explains in the video above. During puberty, young men get deeper voices. That is the result of the lengthening of the cartilage in the larynx, the growth of chambers in the head where the voice resonates, and the thickening of the vocal cords. These growth spurts help deepen the voice, in the same fashion that the sound of a guitar string gets deeper the thicker and longer the string becomes.
But all of these changes are not happening in concert. The process is as awkward as a middle school dance and the inconsistent growth means that sometimes the pieces don't quite fit together. That causes the voice to crack. The "sudden and differing growth rates" of everything involved in the voice makes it difficult for the brain to "control the voice mechanism."