Preface: this question is already asked here but user gave up and gave solution to first answer. This question also differs in that I have two similar collection structures,
This is telling you that territories/6 does not exist as an actual document, whereas territories/7 does.
In Cloud Firestore it is possible to have subcollections owned by "virtual" documents - that is the document at the higher level doesn't exist, but it has children.
These virtual documents can be easy ways to organize information without have to create duplicate dummy documents.
In this case, you've either:
territories/6 before
you created the territories document, orterritories/6 without deleting the subcollection documents.