I have a theory that Monkey D. Dragon was once a Marine.
After Roger’s execution – Roger’s devil fruit reappeared and the Marines/World Government got hold of it somehow.
Dragon (who was possibly a high level Marine) used Garp’s Legendary Hero Status to gain the Government’s trust in order to get near Roger’s devil fruit to steal it for himself, hell maybe he was responsible for guarding Roger’s devil fruit, being Garp’s son and all. Maybe someone important in the World Government was supposed to eat Roger’s devil fruit and Dragon killed that person as well.
This made Dragon the Most Wanted Man (combined with the fact that he knows the World Government’s secrets like Gol D. Roger surrendering himself).
I suspect Dragon was at Roger’s execution because he was a Marine tasked with the duty of accompanying the prisoner (Roger) to his execution platform.
There may be some past dialogue flashback between the two characters in the future episodes. Maybe this conversation acted as the trigger for Dragon’s betrayal of the Marines.
*Theory by urveen123