The new /worldborder command is meant to prevent players from passing a preset worldborder and kill players and mobs outside of the border. I have found a bug where using the Spectator Mode (Gamemode 3) you can fly through the Worldborder and then if you change your gamemode outside of it you get stuck outside. I don't think is was intended but if it was then I think players shouldn't be able to get outside of the worldborder using this.
This is intended. This is also a duplicate of MC-54246