Plot my friend, plot.
However not it's confirmed that Gai with 8th gate >> Juubi Jin
8th gate gai still lost to juubidara. We cant really say whether or not how he would do vs any other juubi jin(even hypothetical really).
We can confirm for the most part 8th gate gai>madara without hashi dna.
Plot certainly played a role. But it isnt the sole reason for why he didnt get the head.
There is actually a GOOD explanation for why he didnt aim for the head.
The head is a small target compared to the vital areas of the chest. It is for this reason kakashi does his raikiri aiming at peoples chests. When kicking a all out attack, it is better to hit somewhere you are sure to hit, than to go somewhere you may miss.
Even with bullets, irl, going for the chest can be a better target.
This is all just ignoreing the intense pain and agony that gai was feeling.