Bounties are not solely a reflection of combat ability. Law warranted an equal bounty to Luffy for his role in taking down Doflamingo and
betraying the World Government.
In terms of combat ability, it wasn't close. We didn't get to see the full extent of Luffy postskip until the Katakuri fight.
Now compare and contrast how utterly powerless Doflamingo was versus G4 to Cracker fighting that mfer for 11 hours despite having to deal with Nami's hard-counter against him.
G4 Luffy VS Doflamingo
G4 Luffy VS Cracker