You're right. The way to explain it intuitively is that at the quantum scale all particles are wavelike.
In order for electrons to achieve stability (such as within an atom), they must create a standing wave. Similar to the notes on a guitar string, each electron orbital is simply a harmonic.
The complication comes from the fact that atoms are 3d, so instead you need to use spherical harmonics, but it's the same principle, just standing waves in 3d space. These should look familiar if you've seen rendered images of electron clouds: https://en.wikipedia.org/wiki/Spherical_harmonics
It is quite surprising that this intuition is basically never taught in classrooms.
In order for electrons to achieve stability (such as within an atom), they must create a standing wave. Similar to the notes on a guitar string, each electron orbital is simply a harmonic.
The complication comes from the fact that atoms are 3d, so instead you need to use spherical harmonics, but it's the same principle, just standing waves in 3d space. These should look familiar if you've seen rendered images of electron clouds: https://en.wikipedia.org/wiki/Spherical_harmonics
It is quite surprising that this intuition is basically never taught in classrooms.