The reason planets orbit stars is due to gravity. The reason stars glow is due to heat. What’s the reason for gravity existing?
There is no reason.
It simply is.
Humans have found 4 forces that control the universe. (there many be a fifth involving quarks but that is still to be proven)
Electromagnetism
Gravity.
Strong Nuclear force
Weak nuclear Force.
Everything we experience in this universe is the interaction of these 4 forces.
I’m a decade out of school but I think you can show that any theory that allows a massless spin-2 particle necessarily gives rise to gravity as a force. I remember seeing how this exact particle emerged when solving equations of motion for bosonic string theory and being pretty impressed (iirc it was a symmetric traceless rank 2 tensor field or something similar and the Prof had to handwave a bit on it being equivalent)
So maybe we have gravity simply because there are a lot of ways to construct a universe with it and only a few special cases without it.
This is a fair question, and I doubt we’ve really heard the last of this subject.
The same reason why everything else exists: We Have No Idea ™