Why protons and electrons attract each other?
The basic answer to the why is :"because that is what observations and measurements tell us"
Then mathematical model building comes in, i.e. theories with specific laws used as axioms to pick up mathematical equations that fit observations.
For electromagnetism there exists classical electromagnetic theory, culminated in Maxwells equatiions, that describes the behavior of charged particles to great accuracy
But isn't because it due to potential energy of each other?
This is the answer in the classical theory of electrodynamics, and is correct for charges in general. The force induced by opposite charged particles is attractive and the potential energy is derivable from the force in the mathematics of the theory.
But protons and electrons are so small that they belong to the framework of quantum mechanics, and their behavior is described by quantum electrodynamics, QED. This is where this explanation is trying to convey, in a semiclassical way:
It states that electrons and protons are bonded together by emitting electromagnetic waves and absorbing each other's em wave.
In QED amathematical set up can show the interaction of an electron and a proton as the exchange of a virtual photon, where the photon is the carrier of electromagnetic interactions as well as the quantum of an electromagnetic wave which builds up to a classical wave according to classical Maxwell's equations.
So both answers are correct, within the mathematics of each framework assumed. The classical can be rigorously shown to emerge from the quantum, but it needs a few years of studying physics to really get into it.