The elementary electric and gravitational charges are quantized. The electric charge of electron is measured as – e, the electric charge of proton and positron are measured as +e. The elementary gravitational charge of electron is – g me, the elementary gravitational charge of proton is + g mP and of positron is + g me. The charges as sources of the fields are quantized. Why? Only the Nature knows is, why.
The fields are continuous functions of r and t which have discrete sources (= the elementary charges). The fields obey the Maxwell-equations as equation of motions for continuous functions. There are no physical reasons to assume that these fields are quantized.