I don't know why it's doing this but it keeps adding pages horizontally, when I delete those 2 on the right, it adds them again automatically.
It's because you create the document with a Primary Text Frame. InDesign automatically add pages at the end of the document while the text flows. I don't see well your image but maybe there are some invisible characters flowing. Personally I recommend checking Primary Text Frame in new documents only for novels or books with fluent text.
To avoid this, go to Preferences → Type → uncheck Smart Text Reflow