Long ago, we thought that federation in Wikibase would be supported via a “repo name” component of the entity ID, e.g. wd:Q42 or commons:M80857538. This is not how we ended up doing federation, but some code for it still exists; notably, wd:Q42 can be parsed as an entity ID, and a lot of code will just never look at the wd “repo name” component of the parsed ID. This means that in various places it’s actually possible to save edits with such entity IDs, which we don’t really want: those entity IDs then cause bad problems in other places (see subtasks for details).
We should prevent all such edits, and eventually rip out all of the supporting code too (T291823).