I think you have definitely had something go wrong. Before retiring I tended to run a new version of Moodle each school year so I have a number of archived databases to look through. It is common to see 0 for nearly all attemptnumber entries except when you I allowed someone another attempt, in which case it contains a 1, 2, or higher. Highest I saw was 4. In the same row it may show a 'status' of draft, reopened, or submitted.
My last completed year shows 2,534 rows in the mdl_assign_submission table. I do NOT have any rows where the userid=0. Most rows shows a 0 in attemptnumber, with 261 rows showing 1 or more attempts. Those numbers are about the same for the four years I checked.
Depending on the type of assignment, could it possibly be caused by having Moodle open so long without clicking on something, that their login has timed out, and yet they try to submit anyway?