This is indeed very strange, and apparently the first report of such an issue. Theoretically, this may be caused by a loop that allocates IDs and does not use them or creates objects and then deletes them, but the gap is too large to believe that this is what happened. At this point there is no path to fix anything as there is insufficient information to understand the cause.
No special problems can be observed in the database, which seems to be functional, except that the automatic ID generator that is used for some of the entity classes jumped unexpectedly. Therefore, although the numbers are very large and strange, it is unclear why they cannot be used, unless you need them in a user interface that expects shorter numbers.
There is no quick solution for updating the IDs as IDs are fixed once set. Fixing the database may require creating a new database and copying the content of this database to a new database, using a custom program.