IIRC, it stemmed from a few situations where the number of ballots exceeded the number of registered voters, due to same-day voter registration and/or provisional ballots. That's since evolved into the kind of sharpie-doodling ignorance/obstinance that Trump has coasted on his entire life.
In many cases, it's more prosaic than that. Sometimes, people make mistakes. A ballot is put in a drop box. Someone is supposed to scan it. They don't. The little green light doesn't beep when they run the scanner, but they throw it in the bin anyway. When it comes time to count the ballots, the bin has 258 ballots in it, but there were only 257 scans recorded.
Another issue might be with mail in ballots. There, lots of ballots come into a single, central, location. A worker scans the ballot. It's from precinct three. Over on the table, there are ballots for precinct 1, precinct 2, and precinct 3. He puts it in the precinct 2 box by mistake. Now, precinct 2 has one extra ballot, and precinct 3 has one too few ballots. When dealing with literally millions of bits of paper that have to be sorted and analyzed, sometimes it goes wrong. There are ways to make it go not quite so wrong, but that requires more people to do more things, and that can get expensive.
Some pretty big problems were identified with this in the August primary, and steps were taken to fix the problem, but they weren't always effective, and there were still lots of problems, but the total number of problem cases dealt with a few hundred total votes.