Why does quantum theory predict that there are an infinite number of quark-antiquark pairs in a proton? Why does quantum theory predict that there are an infinite number of quark-antiquark pairs in a proton?
The typical definition of a proton is that it is the state of 2 up and 1 down quark held together by gluons. There are studies that state that there also exists a intrinsic charm quark because 'quantum theory predicts that there are an infinite number of quark-antiquark pairs in a proton'.
The NNPDF Collaboration. Evidence for intrinsic charm quarks in the proton. Nature 608, 483–487 (2022). https://doi.org/10.1038/s41586-022-04998-2
Could you please explain how quantum theory predicts that there are an infinite number of quark-antiquark pairs in a proton?
 A: When we say that an atom is made of protons, neutrons, and electrons, this conjures up a mental picture of a thing you could model with different-colored ping-pong balls.
However, that only works because protons,  neutrons, and electrons are subject to “number conservation laws.”  Protons and neutrons are “baryons,” and there is no known process which can change the number of baryons in a closed system.  Electrons are “leptons,” and there is no known process which can change the number of leptons in a closed system.  The total electric charge of a system is also a constant.
It turns out that there is an interaction which can move electric charge between the baryon and lepton sectors. This feeble interaction (whose real, technical name is “the weak interaction”) can turn a charged electron into an uncharged neutrino, so long as a charged proton turns into an uncharged neutron to preserve the total electric charge. Other charge exchanges are also allowed, including some where the total “lepton number” is held constant by creating or destroying lepton-antilepton pairs.  Because this “charged current” is “weak,” we can usually pretend that it doesn’t happen, and that our ping-pong-ball model actually describes constituents which we can assemble into an atom.
However, the interaction between quarks is strong. (Really. “The strong interaction.” No imagination.) Because of this strength, creating and destroying quark-antiquark pairs costs less energy than is sloshing around in the complicated QCD ground state that we call “a proton.” Each quark counts as one-third of a baryon, and each antiquark counts as negative one-third.  Because creating or destroying these $q\bar q$ pairs is free, the proton has total baryon number $+1$, but its “baryon asymmetry,”
$$
\eta = \frac{N_q-N_{\bar q}}{N_q+N_{\bar q}}
$$
is not well-defined.
Quantum mechanics doesn’t describe what things are, but instead describes what happens when things interact.  When you scatter particles off of protons, the chance that you scatter from an antiquark depends on the momentum exchanged during the scattering interaction. There’s not a good way to interpret this experimental fact in terms of a constituent-quark model. You could say something like, “the baryon asymmetry of the proton depends on the scattering energy.” Or you could say something like, “there are more $q\bar q$ pairs in small pieces of a proton than there are in large pieces of a proton.” But both of these statements raise interpretation problems  of their own.  The best solution is really to grok that quantum mechanics sometimes reveals that we have asked the wrong question.
A: I want to add to the answer by Rob, the eye of the experimenter.
You ask:

Why does quantum theory predict that there are an infinite number of quark-antiquark pairs in a proton?

Quantum theory developed because classical theories could not fit the data from experiments examining the details of matter at small dimensions. The experiments with scattering electrons and light on atoms showed that atoms had electrons and positive hard cores of even smaller dimensions.
The atoms were seen to have a cloud of electrons around a positive center with very much smaller dimensions than atomic distances, the nucleus. Further experiments with higher energy projectiles of deep inelastic scattering on nuclei helped to discover the periodic table of elements, composed of protons and neutrons. The data from higher energy deep inelastic scattering on protons allowed to see that there was hard scattering that resulted in the creation of jets of particles coming out of individual interactions,
here is an event


Real proton-proton collision event at 13 TeV in the CMS detector in which two high-energy electrons (green lines), two high-energy muons (red lines), and two-high energy jets (dark yellow cones) are observed. The event shows characteristics expected from Higgs boson production via vector boson fusion with subsequent decay of the Higgs boson in four leptons, and is also consistent with background standard model physics processes.

Meticulous studies trying to find a model for the data came up with the quark model and finally the SU(3)xSU(2)xU(1)  current standard model. The quarks cannot be seen but the field theoretical model is very successful in fitting a large plethora of data.
This is what you describe as an infinite number of quarks and gluons,


Snappshot of a proton -- and imagine all of the quarks (up,down,and strange -- u,d,s), antiquarks (u,d,s with a bar on top), and gluons (g) zipping around near the speed of light, banging into each other, and appearing and disappearing. (M.Strassler 2010)

BUT you are not aware that in field theories the particles shown in the proton are virtual. . Virtual means that in the mathematics of the theory the mass of each depicted as quark anti quark gluon is off mass shell, it does not exist outside the nucleus. Only the accumulation of scattering events on the protons , in the first image, can be predicted by the field theory mathematics, and the fits have given rise to the parton model of the nucleus.
See some parton distribution functions

If you go to the link you will be able to enlarge and see the individual plots for quarks etc.
So the infinity is a mathematical infinity, and for each individual scatter what is important are the conservation laws as Rob describes.
