But I’m going to guess that you have not reviewed all the decisions in child name disputes in this country, or even a majority of them, to really know if it has ever been been done. 
I'll give you one case in which the court did in fact give the kid a hyphenated name in an initial naming dispute rather than choosing just the surname of one parent or the other:
Although the district court did not have the benefit of the list of factors we adopt in this opinion, the court did evaluate the best interests of the child, and its determination was based on several of the factors we now adopt. For instance, the district court considered “the length of time the child” used his current surname, which also addresses whether the name change would “cause insecurity or identity confusion.” 57 Am. Jur. 2d Name § 14 (2012). The court further noted that Adrianzen filed the action to change the child's surname within two months of birth. The court also considered the “potential impact of the requested name change on the child's relationship with each parent,” id., noting that the hyphenated name would allow the child to identify with both parents. Further, Adrianzen testified that in many Hispanic families children have hyphenated last names. Therefore, we conclude that the district court did not abuse its discretion in determining that it was in the best interest of the child to change the child's surname, and we affirm the district court's order.
Petit v. Adrianzen, 392 P.3d 630, 633 (Nev. 2017). In that case, Petit, the mother, had given the child her surname at birth. Then the father, Adrianzen filed suit to change the child's name to his surname. The district court then decided to impose a hypenated name even though neither parent had asked for that. The Nevada Supreme Court affirmed that decision in the opinion cited above.
Note too the comment from the Ohio Supreme Court on the issue: "A combined surname is a solution that recognizes each parent's legitimate claims and threatens neither parent's rights. The name merely represents the truth that both parents created the child and that both parents have responsibility for that child. In re Willhite, 1999-Ohio-201, 85 Ohio St. 3d 28, 33, 706 N.E.2d 778, 782. The Supreme of Alaska, after reviewing the Ohio Court's discussion of hypenated names, stated "Although we are not ruling that these considerations necessarily apply to the present case, we think that they are worthy of serious consideration." In re A.C.S., 171 P.3d 1148, 1154 (Alaska 2007).
There are other cases in which a court has approved a hypenated name even though both parents did not agree to it, most commonly where one parent has named or proposes to name the child with the hypenated name and the other insists on just his/her surname. "In the instant proceeding, the court holds that, given the theories of equal protection and the right of equal parenting, defendant herein has done nothing to prejudice the right of the father to bear his surname. As noted above, neither parent has a superior right to determine the surname of a child (Cohan v. Cunningham, supra). It is only right to note, however, that the court's decision might have been different had defendant given the child her own surname, and not the hyphenated name that she did." Rio v. Rio, 132 Misc. 2d 316, 324, 504 N.Y.S.2d 959, 965 (Sup. Ct. 1986).
In short, it is not the case, as you suggest, that in every state the judge is restricted to using either the father's or mother's surname and that the court cannot order a hypenated name unless both parties agree. That may be the case in some states, but clearly is not the case in all of them.