During a recent interview with IGN, Captain America: Civil War writers Christopher Markus and Stephen McFeely explained their decision to make major changes from the comic storyline. This also includes information on the film’s ending, so please do not read unless you want to know about the ending.
In the original Civil War comic, Captain America/Steve Rogers was shot and “killed”, and was taken into custody. Markus and McFeely were asked why the film did not feature a major character of the Avengers ultimately dying. They advised that losing a character on either side, would have ultimately resolved the issues between both sides.
They instead wanted to create a scenario where the team was seemingly shattered… So when Thanos arrives, the heroes are basically “screwed.”