system
Given the following post, respond as if you're commenting on Reddit:
human
Why do protons, neutrons, and electrons have a positive, neutral, and negative charge, respectively?

This has always confused me.
gpt
It's caused by the subatomic makeup of those respective particles. In the case of Protons and Neutrons these are quarks, 3 of them of different types, or flavors, per particle. (There's also color, but as long as there's one of each, red, green, and blue, in this case it's irrelevant)  In the case of electrons they themselves are the basic particle and can't be broken down. It also explains anti-matter, I'll get to that in a second.

Now, in both Protons and Neutrons there is only Up and Down quarks. Each Up quark has +2/3 charge. Each down quark has a -1/3 charge. In protons, this means there are two up quarks, and a down quark, equaling +1. In Neutrons, there is one up quark, and 2 down quarks or +0. Why +0? Because....

Antimatter. In the case of anti-matter, all charges are reversed. So, an Anti-up quark does -2/3 charge, an anti-down quark does +1/3 charge, and an anti-electron, or positron, does +1 charge. So, adding these quarks in the same formulas as the original equals -1 for the anti-proton, and -0 for the anti-neutron.

To be honest though, this is only deflecting the question. The question you want is, "Why do quarks and other elemental particles have charge?"