The first musical to use this numbering system was The Black Crook (1866). This show featured a total of 16 musical numbers, which were all given unique numbers. The numbering system quickly became popular among other musical theatre producers and has been used ever since.
Today, the term "numbers" is still used to refer to musical theatre songs, even though they are not always numbered in the script or the score. The term is simply a convenient way to refer to these songs and their place within the musical.