As you said, they actually don't know anything. In the context of QED, one can interpret the fact that electrons trajectories are affected by the electric field as a consequence of the way the electron/positron field is coupled with the photon field. In fact, this last is what we call a gauge field: it is the field that tells us what will be the trajectories of particles in it. Since particles are excitation of fields, electrons are special excitations of the electron/positron field and, because of this coupling between our two fields, we can say that electrons only sense electric field via acceleration if they are stopped from their natural motion, just as Trula said. This is a rather rough explanation but you can think of this motion analogously as water current regarding whatever is in the water, but don't let your mind lie too much on it. This may be an unsatisfying answer because, just like Mmesser314 pointed out, physics does not explain the way the universe works, it describes how it works. We will probably never know anything more fundamental that "photon field is the gauge field where excitations of electron/positron field lie". From a mathematical point of view, here is what I said:
Let $\psi$ be a bispinor Dirac field and $\overline{\psi}$ its Dirac conjugate. Let $A_\mu$ be the components of the photon four-vector field. The free Dirac equation is
\begin{equation}
(i\gamma^\mu \partial_\mu-m)\psi=0.
\end{equation}
With $\gamma^\mu$ the gamma matrices. Now let's introduce de covariant gauge derivative associated to the $U(1)$ symmetry: $D_\mu=\partial_\mu+ieA_\mu$. Then the Dirac equation becomes:
\begin{equation}
(i\gamma^\mu D_\mu-m)\psi=0.
\end{equation}
This means that if we are in the gauge field, electrons will seem to be in free motion. Now we can rewrite this equation as:
\begin{equation}
(i\gamma^\mu \partial_\mu-m)\psi=e\gamma^\mu A_\mu \psi
\end{equation}
and this means that if we are outside the gauge field, electrons will not be in free motion. If electrons were at rest from our referential, then they will acquire kinetic energy. See that our coupling is a sort of abstract "contact" between our two fields. Not a physical one but more like a conceptual link.