The numbers are to avoid confusion on side-by-side courts. If one court is playing with balls with a two on them and the court to the right has balls with a 4 four on them, then the balls can’t be confused if they end up on the other court.