For me, the reason for killing off the Tarly's was to pave the way for Sam to inherit Horn Hill in the end. Could that be as simple as it is?
This to me would complete Sam's arc as his storyline starts out with him having been the rightful heir all along, but in a cruel manner was forced to give this up. We as viewers/readers sympathize with Sam in this, making him a 'good guy' in our minds, and that ending would be the justice he deserves. In regards to him still being a member of the Night's Watch who has sworn vows, I don't think there's going to be a Night's Watch at the end of all this, which would free him up to head home, marry Gilly, and inherit Horn Hill. I mean why not, for starters he already has his family sword, and surely there is a greater significance to that which hasn't been touched on yet.