A lecturer of mine has a website, The Orbitron, giving lots of details, information, equations and much better graphics of molecular and atomic orbitals, right up to the very exotic… such as 7g.
In answer to your question, the shapes are, as has been said, due to the quantized nature of some of the properties of electrons, giving rise to ‘set’ solutions to things like where they can/cannot be and the wavelengths of light they can absorb.
The best way to understand the shapes of orbitals is to gain an understanding of how the Schroedinger Eqn works. I enjoyed the lecture where my physical chemistry professor guided us through using it, I could see the shapes of the orbitals coming as an inevitability of how that Eqn is used, and it was pretty neat.
As for why quantum mechanics works the way it does? Chemists don’t generally care for such esoteric questions about the why/s of our models that allow us to predict and make cool shit, so long as they do allow us to make cool shit, because that really is the business we’re in.
Leave the lifelong searching for fundamental yet irrelevant truths to the physicists and philosophers.