Until the 1999 season, teams were given a new number every year. In 99, FIRST began assigning permanent numbers based on age. The veteran teams that year were given numbers based on when they registered for the season. You can see a full listing of teams by age
here.