The traditional explanation for this phenomenon is that the subset of campaign polls that are released to the public is subject to a type of selection bias. Campaigns conduct polls all the time, but only occasionally disclose these results to the public and will be much more inclined to do so when the numbers are favorable for their candidates (especially in comparison to independent polls). In essence, the internal polls that filter their way into the public domain may be the outliers.
This is certainly an important part of the story, but my view is that it lets the campaigns off a little too easily.
Pollsters must make a lot of choices and assumptions about turnout, wording of questions, whether to include third-party candidates in the polls, how hard to push “leaners” toward their preferred candidates, among other factors. These can be difficult choices, even if one is operating in good faith in an effort to be as accurate as possible.
But when campaigns release internal polls to the public, their goal is usually not to provide the most accurate information. Instead, they are most likely trying to create a favorable news narrative — and they may fiddle with these assumptions until they get the desired result.