Akainu and him are nemesis, who always had antagonists behaviour since Ohara incident, with Aokiji being dubious of the World Government's actions.
Blackbeard aims at overthrowing the world government and becoming King of the world, which is an opportunity that Aokiji most likely saw to know the real truth behind the world government. As he stated himself, he never believed the world government was all that
That's why he
> Went on a mission to take WCI's poneglyph, capture Pudding(Poneglyph reader)
> Discussing with Blackbeard about the man with the burn scar(and his poneglyph)
He joined Blackbeard with the goal of finding the truth behind the World government, thinking the best way being helping Teach in his goal to find the one piece, and overthrowing them
So it's just a difference in perspective