Ultimately that subplot served as a sort of learning experience for Finn, in the first one he saw the first-hand evil of the First Order, and in this one he sees how this has resulted in massive inequality and injustice in the galaxy. Reckon in (or by) the next one he may be the main agent for rebellion recruitment while Rey deals with Kylo.
The whole codebreaker thing and what it meant for the resistance was a red herring, it was more fleshing out the state of the galaxy through Finn’s eyes. That said I hated that whole portion of the film, they could’ve done it so so much better.