The code is something you purchase in order to unlock what the game calls Party Mode. Once you have it, the mode is yours to use whenever and wherever you like.
Without it, the code mainly serves to open up additional songs. If you already own the relevant pass or membership, check the in-game store to see whether Party Mode is included before paying again.