Garp is fine in this flashback, the issue is that his character as a whole makes no much sense.
Did he never realize he was serving the same immortal demon he fought?
Or he just didn't care?
It's ass in both case
I think Garp met Imu directly, and was told more or less this: "Since you fought bravely to protect the World Government, and knew not who Mu was, Mu will forgive this transgression. You shall be the Hero of this incident, to help grow the strength and loyalty of the Marines. But, if you ever speak of this, or flee the Navy... Goa Kingdom, your home, will be the location of the next Human Hunt. Continue to destroy Pirates, for the sake of a better world, Monkey... D. Garp."
Blackmail is the only explanation that makes sense to me at this point.
Revealing Imu to so many people was a narrative mistake for me
Only Xebec should have known and fought Imu directly
Based on how Haki works, once Imu showed up everyone would know anyway. I'd imagine that Rocks has told his crew about the flower room and Imu as well. Kaido and Meme knowing Imu's power fully explains why they never really went after the world government, they already knew that they just couldn't win without amassing a ridiculous amount of firepower from the ancient kingdom, the enemy that truly threatened Imu.