For example with King Joffrey, he is (I know, I know he really isn't) the descendant of Houses Baratheon and Lannister, so because of that which last name is he passing to his children?
In my country we have two last names, the one of the father and the one of the mother. So my name is Name last1 last2 and I only pass my first last name to my children, so for example my wife's name is Mom_Name Mom_last1 Mom_last2 and my children they all will have Child_Name last1 Mom_last1, so only the House of the father is passing through time.
Maybe it is different in your countries, that's why I wanted to explain that.
I understand if the last name they pass may be the one with more importance, but it should be a rule, because if not the great name of House Lannister could be lost (Jaime can't have children and Tyrion is not welcome in the family).