This is a commonly-asked question. Fortunately, the answer is relatively straightforward, and understanding it all can greatly help a researcher when interpreting the man’s story.
First, it is important to understand that at the time of the Great War there was no concept of the soldier retaining his original number for life. This was not introduced until 1920.
There are essentially five possibilities:
Transfers
If a man was transferred from one regiment or corps to another, regardless of the reason, the regulations required him to be renumbered. He ceased to use his existing number and was issued with a new one from the sequence in use by the regiment or corps to which he was being transferred.
Re-enlistment
The same logic applied if a man re-enlisted at some point after being discharged. Even if he rejoined the same regiment or corps, the man would usually be given a new number.
Renumbering of the Territorial Force
The situation was even more complex for men who joined the Territorial Force, for they would be renumbered not only if they were transferred to a different regiment or corps, but even if they were posted between Territorial Force units of their own regiment or corps. In 1917 this system was changed and men were issued with new numbers.
For full details of this matter, see The renumbering of the Territorial Force
Renumbering of the Royal Engineers waterways, railways, road and quarrying troops
In 1918, the War Office authorised the renumbering of men serving as Royal Engineers transportation troops units. The new numbers had a “WR” prefix.
The 1920 numbering scheme
New numbers were created for this scheme, and for men already in service it meant replacing their existing number.
For details, see The 1920 numbering scheme