I think I get the ending, and why it felt as off as it did. We were all expecting this epic and awesome battle between Dunn and The Horde, as well as good triumphing over evil. But we forgot something: the film's setting isn't a superhero film like Iron Man, or The Avengers or any DC property. The world of the story is sort of similar to our real world. Remember what Elijah said to David when he called him after remembering he wasn't injured in the car crash in the first film? Even better, what he said to Patricia the night before bringing the Horde out? "This part won't be like a comic book." "This isn't a cartoon."
We were looking at the film like the typical comic book films that have overpopulated the theaters in the past decade and a half. David and Kevin are both suppose to be real, so naturally they aren't trained to fight like how you see in comics or the epic battles in the Avenger films. The entire ending is playing against expectations. And what happens to David, Elijah and Kevin, that's just real life. Not everyone gets a happy ending. Not everyone gets to walk away from the fight. The good and the bad are taken out equally, and unceremoniously. Not all of them got a chance to say something in the end. It was brutal and real. And then we get another twist when we realize what Elijah's plan really was. The Clover Group may have taken all three out, and the truth about super humans existing may be out, but it doesn't mean it's an ending.
As Elijah said himself: "It's an origin story." It's the origin of that film universe's super humans finding out they're not alone and that others like themselves exist. Now, the world knows that there are those who can be more, all at the cost of three lives. It's a complete subversion of the typical superhero story ending. It's brutal, it's sad, but it's the closest to a real world ending. The truth is out, and the Clover Group may now have a lot more competition to deal with.