Hi João Roque,
This happens a few times because when an id is taken, then the auto number increases, even if the id ends up not used because of a rollback.
For instance, you inserted 21 records and you got he records until the id 21. You upload an excel file that creates records up to 10019 but then you have an exception that ends up roll backing the records inserted with ids 22 - 10019. When you insert the next record, it will take the id 10020 and the table ends up like the one in your example.
This is probably what happened. You can also go to the database and set the auto number to 10020 but it's unlikely that somebody does it, and working on the OutSystems cloud, one doesn't even have the access to do that.
Kind Regards,
João