(Edit because we got a little confused in the replies: If it were all protons, they would repel and overcome gravity. But real matter isn't that, it's always protons and neutrons and electrons with close to no net repulsion so gravity wins.)
Similarly, radioactive nuclei (alpha emitters and spontaneous fission) happen because the electromagnetic repulsion exceeds the strong force, which has a very short range and doesn't reach across those large nuclei.