You seem to be misunderstanding the concept of X/G.
X/G isn’t assessing the end result, or the final action (the shot/header etc in this case), it’s quantifying and qualifying the chances created that leads to that final action and the probability of its outcome.
Again, you are confusing the final outcome - retrospectively (and with the benefit of hindsight) - with what X/G is describing, which is the event that precedes that - at the time it happened.
To put it another way, you are confusing "what chance came closest to scoring" with "what chance is more likely to come closest to scoring".
X/G doesn't describe who was the better side, whatever that means, it describes whose chance creation is more likely to lead to a goal based on hundreds of thousands of similar events. It will never be perfect because humans aren't replicants and there are so many variables, but it's better - less biased - than human assessment which is influenced by emotion and bias.