In this sentence, if team B wins, the subjunctive mood used in this part indicates that team B lost is a fact that the author knows. He just doesn't understand, since team B lost, why are they both happy?
If the speaker is just guessing and doesn't know which team won, then this sentence should be: Well, if team B wins. ...