Grand Unified Theories, (GUTs), provide a clear explanation. One large gauge group is a collection of the Standard Model SU(3)xSU(2)xU(1) Symmetry groups. These theories state that electrons and quarks are found in the same representations as the large group. Since electric charge is one generator of the group, the sum total charges of all particles within one representation must be zero. If the large group is SU(5) then one representation has a positron and electron neutrino. This means that the dquark charge must equal -1/3 the positron charge.
There is a big “if” in this statement – we don’t know if there exists a grand unifying theory that unites strong and weak interactions.