According to the Computer Archeology page on Space Invaders, port 1 presents "player 1's shoot/left/right" input to the CPU, whereas port 2 presents player 2. Playing around the code in an emulator, this tracks: if I start a 2-player game of Space Invaders, then when player 1 is on, only the inputs mapped to player 1 work in moving the spaceship/shooting; then when player 2 is on, only the second set of inputs work.
However, looking at photos and descriptions of the original arcade machine's control panel, there are only five buttons visible: left/right, fire, and 1-player start/2-player start:
So what's going on here? Is it simply that the same move left/move right/fire buttons were connected both to the player 1 and the player 2 inputs (by physically splitting the wires)? Was the internal hardware designed so that it can be used in other arcade games where there is simultaneous two-player input, and on those machines there really is two set of inputs?