a bass is tuned the exact same way as a guitar's bottom 4 strings (EADG), just obviously at a lower octave than the guitar.
so, just like you can play sunshine of your love, under the bridge, sweet child o' mine, and stairway to heaven (all in different keys) all on the same guitar without swapping guitars or changing the tuning of the strings, you can play various songs in the same key without changing your bass.
the reason he probably switched for the final song was either because he just wanted to show off his lakers bass, or the tone/effects for the final song were so different from the rest that it's easier to just change basses rather than change the settings on his gear between songs, or the final song is played with the bass strings tuned to BEAD or some other alternate tuning.
ETA: i just checked the setlist, By The Way is indeed played in drop-d tuning (DADG), so most likely that's your answer. it's very basic and simple for flea to detune the E down to a D on stage between the songs himself, but they're already paying a bass tech, and it's a lot more accurate and efficient if the tech does it with a tuner backstage and then just hands flea an already perfectly-tuned bass. and besides, nobody likes those awkward moments between songs when the guitar/bass player is plonking around trying to tune their strings.