Luffy got destroyed a lot of times in the manga. Luffy also just had a two year training with Rayleigh, do you really think he would lose to the first real opponent he goes against? Also, doffy was handicapped by law who did a suicide attack on doffy and yet he recovered off of it. So doffy was not at 100% health when luffy defeated him and a lot of people had to buy him time before he could actually finish off doffy.
So it was not even a fair 1v1 match up which he won, he received a lot of help from a lot of people and only then he was able to defeat doffy.