The following contains major spoilers for Marvel's Darth Vader issue #18.
Darth Vader is a Dark Lord of the Sith and a master of the Dark Side of the Force. So why is it that he takes orders from anybody other than the Emperor in the original Star Wars: A New Hope? Star Wars fans have often wondered why Grand Moff Tarkin is the one "holding Vader's leash" in the original Star Wars film, but now that question has been answered in Star Wars comics. While Vader may be the most powerful, Tarkin is capable of outsmarting the Sith Lord.
Marvel comics is in the middle of a run of Darth Vader comics which follow the Dark Lord in the early days of his life following his transformation from Anakin Skywalker. In previous issues, Vader assisted Tarkin, and in return, in the most recent arc, (via ScreentRant) Vader requests that Tarkin and his men attempt to hunt him.
What follows appears to be a mostly one one-sided slaughter as Darth Vader takes out all of Tarkin's top men. However, Tarkin isn't simply letting his men die. He's using their deaths to gauge Vader's power. What exactly is the Dark Lord capable of? What is the range on his ability to choke the life out of you from a distance? Tarkin, answers many of these questions before, as the last man standing, he finds himself running for his life from a pursuing Darth Vader.
Except Vader has been led into a trap. Tarkin knows the desolate alien world this hunt is taking place on, and he leads Vader to an area where lightning is frequently found. As a taller, and more metallic, target than Tarkin, the lightning seeks out Vader, frying his systems, and leaving Tarkin standing over him. Vader is still not defeated and he does reach out with the Force to apparently try and kill Tarkin, but he stops short of actually ending Tarkin's life.
The pair leaves the planet together, and one assumes, become allies, at least of a sort, from here on out. Whether Tarkin has earned Vader's respect, or Vader simply sees Tarkin as a useful ally due to his intelligence, isn't clear, but either way, it makes sense that the two would work together when they find themselves both on board the Emperor's Death Star together.
Star Wars has been using sources like the comic books and novels to help answer questions and fill in gaps in the major Star Wars storylines. While, at the time of the first movie, the relationship between Darth Vader and Grand Moff Tarkin wasn't all that curious, the evolution of Vader made it so over the course of the trilogy. Now, it all makes at least some degree of sense.