Roger's character really becomes quite weak in this flashback because his entire motivation is Shakky and Oda didn't even build or deepen their relationship. Roger is just a random fanboy of hers. I wonder if he'll have any redemptive moments.
It was all Garp
The WG knew Rocks was a Davy and wanted him eliminated. When he showed up, Saturn or Garling probably gave Garp a direct order that he was to fight and capture Rocks, not Roger. They might have even used Dragon as a hostage or threatened him somehow.
Garp then convinced Roger to take down Rocks. Since Rocks was Roger’s longtime rival, Roger saw this as a golden opportunity to take him out, and so he did so.
Roger was never portrayed to necessarily be honorable like Luffy. And we especially don’t know if he was like that in his youth.