I don't know how
your page numbers got there because there are several ways of doing this.
A page number in Word is a
field, a PAGE field.
Headers and footers are normally formatted using the Header and Footer Styles. Those paragraph Styles can have left and right
Indents set outside the margins. If they do, placement of the left page number is simple: that is where the line begins. Placement of the right page number is usually done using a right tab. In ribbon versions, it may also be done with an alignment tab.
Sections / Headers and Footers in Microsoft Word 2007-2013
In earlier versions of Word, page numbers often were inserted inside invisible Frames that could be placed anywhere on a page.
The page numbers in the Insert > Page Number gallery are really building blocks with these fields.