onEachSide() refers to the page numbers on both left and right side of the current page number. By default, the value is 3. Meaning, it will always return 3 links on both left and right sides of the current page number.
Example: Current page is 10 and onEachSide is set to 3.
< 1 2 ... 7 8 9 [10] 11 12 13 .. 29 30 >
Since you only have 10 pages, it will always give you the whole 10 links when onEachSide is set to 3 and above. Try setting it to 2 or 1 to see the effect immediately. Personally, I prefer 1 so it becomes less cluttered.