Good, old-fashioned, and time-tested ballot stuffing. The machines just made it more efficient to double or triple count a stack of ballots (”Hey, Sally, run this stack of ballots through the counter a few more times.”).
The simple fact is, the ballot counter should be issuing a mark on every ballot it counts and it goes through only ONCE. Not much can be done about stuffing it full of a box of freshly forged ballots, though. That’s what observers are all about.