The maximum value for the side length of the /worldborder command is 30,000,000 which sets it to 15 mil. The actual size of the world is actually 30,000,000 x 30,000,000.
When you create a new world, the world border has a size of 30,000,000 (/tp 29999999 100 29999999 to see it).
When you now change the world border to a low value (e.g. 1000) and want to change it back to the original size, it won't work. The maximum allowed size is 30,000,000, which is half of the original size (/tp 14999999 100 14999999).