There is more to it than that. In a nucleus, all of those protons should be repelling each other. If charge were the only thing, they should fly apart quite rapidly. There is another force that holds them together.
True enough, but that wasn’t the question the OP was asking—which is why most of the answers have been about the electromagnetic force (and charge), as opposed to the strong nuclear force.
For protons it does. They’re made of 2 up quarks (+ 2/3 charge) and one down quark (- 1/3rd charge). Add them up, and you get +1 charge.
And as with the discussion of “Why?” above, every time we answer one “Why”, we just push it back a level. Why do protons have a charge? Because the quarks that form the proton have charges that add up to a +1 charge. So now we need to wonder, “Why do quarks have weird 1/3, 2/3 charges?”
And as with the discussion of “Why?” above, every time we answer one “Why”, we just push it back a level. Why do protons have a charge? Because the quarks that form the proton have charges that add up to a +1 charge. So now we need to wonder, “Why do quarks have weird 1/3, 2/3 charges?”
It’s true one could ask “why” endlessly, but those get into unanswerable questions about the very nature of matter. The OP was asking a compositional question about charge, and it turns out that there’s a complete compositional answer to that kind of question, which involves that quarks and elecrons are elementary particles, and protons and neutrons are composites with a charge that adds up to the sum of their components.
It’s true one could ask “why” endlessly, but those get into unanswerable questions about the very nature of matter.
And that’s the fundamental problem with human knowledge in general. At some point, we’re stuck with “Well, we don’t know, and it’s possible we can’t know, because of limitations of either ourselves, or the Universe”, which is a pretty unsatisfying answer. Religion tries to do an end-run around this with “Because God” as the ultimate answer to everything, but that’s really just pushing it back another level, and hoping you don’t start asking “But Why God?”
Sometimes being a clever ape can be annoying that way. Maybe coming down from the trees was a mistake, after all.
nevermind
Sometimes being a clever ape can be annoying that way. Maybe coming down from the trees was a mistake, after all.
Too much banging rocks together.
@pasta has an explanation for how…
If you want to put something like electromagnetism into the math of the Standard Model, and you also want to ensure that special relativity is never violated in the math, and you want to ensure that your calculations will always give well-defined and finite answers, then you end up needing a “gauge symmetry” to do the job.
You don’t have to put any interactions into the math, but then the math would be describing a very boring universe unlike our actual one. And violating the other conditions is not warranted.
“I don’t always put interactions into my universe, but when I do, I put them in with gauge symmetries.” --The Most Interesting Man in the World
So now we need to wonder, “Why do quarks have weird 1/3, 2/3 charges?”
In part it’s because there are three of each type; the quarks are triplicated due to the existence of the strong force. Each quark comes in three “colors”, so the down quarks taken together represent -1e of electrical charge and the up quarks together represent +2e. The charges numbers also connect to a feature of gauge-symmetry-based theories like the Standard Model that the charges of all the fermion particles within a “family” will always cancel out. You aren’t free to set the charges independently.