SSH key with no onwer

In the Gitea database, as well as in ~git/.ssh/authorized_keys, there is a key owned by user 0:

MariaDB [giteadb]> SELECT id,owner_id,fingerprint,content FROM public_key WHERE id = 39;
id owner_id fingerprint content
39 0 SHA256:[REDACTED] ssh-rsa [REDACTED]

However, no user 0 exists:

MariaDB [giteadb]> SELECT * FROM user WHERE id = 0;
Empty set (0.001 sec)

Is this something that can happen when a user is removed? Is there a better way to fix it than manually removing it from the database?