I know he is doing it because it is the right thing to do but how does that earn him money to pay back the iron bank? Unless he sells the wildlings into slavery
that specific move doesnt help him pay back the iron bank, but he feels like it helps his claim to the throne. if all the other houses in the kingdom see that stannis saved the realm from 100,000 wildlings and maybe more while tommen sat his little ass at kings landing playing with ser pounce and trying to hide his margery boners, then they might side with him. with the money from the iron bank stannis looks like he bought thousands of mounted mercenaries + his own soldiers + whatever house decides to pledge him allegiance for protecting the realm.