The definition of the elementary charge is arbitrary, we could assign the charges +-1 and -+2 to the quarks, then electrons would have +-3.
It is unknown why those charges can be written as integers at all (they could have some arbitrary factors like 2.464235...). If magnetic monopoles exist, they would lead to an explanation why we see multiples of a common charge value only.
There is also a connection between quark and lepton charges, see this post on anomaly cancellation (probably beyond the scope of the original question).