Firstly, it is worth mentioning that Greninja gets an outstanding movepool, having access to Ice Beam, Hydro Pump, Dark Pulse, Grass Knot, Extrasensory, and the list goes on.
However, Keldeo gets Hydro Pump, Focus Blast, maybe a calm mind but otherwise another icy wind.
Their movepools are already drastically different, with Greninja having outstanding coverage, whereas Keldeo just gets decent Stab moves.
Onto their abilities, Justified is complete useless on Keldeo. If you want to use a Justified user, use Terrakion. It's much better in comparison to Keldeo. However, Greninja's ability, Battle Bond, spikes Greninja's stats to allow it to become a massive wallbreaker and a huge threat to the meta.
Additionally, Greninja spiked in usage in doubles due to one of its egg moves - Mat block. Mat block protected both the user and its teammate in battle, allowing its teammate to just set up with swords dance and sweep the next turn. Greninja is a beast in both singles and doubles.
Lastly, Greninja is a much faster pivot, boasting a 122 base speed - which is enough to outspeed most of the entire meta. If it equips Choice Specs, all that is required is to knock out one mon, which it can if set up properly, and continue spamming Hydro Pump to deal serious damage and wallbreak. Smogon also says that Ash Greninja is completely unpredictable, with everyone typically believing that the Greninja is generally Protean, and might switch out say, Dragonite, due to fear of Ice Beam. Another great niche about Greninja's movepool is that it can use Water Shuriken, which if it is Ash Greninja mode, could possibly deal 100 base power damage with priority, which is what makes it relatively feared.
Greninja is much more viable than Keldeo due to its movepool, ability, viability in doubles, can set up spikes, can mat block and is faster. Keldeo may have a higher special attacker, but Water Shuriken and its superior base stats as Ash Greninja is absolutely terrifying.
Hope I helped.
EDIT: As sumwun mentioned, Keldeo can pose as a great check to a variety of Pokemon. However, as a wallbreaker, Keldeo is unversatile and almost everyone knows to switch Tyranitar out at the sight of Keldeo, whereas it isn't so clear for Greninja because it may be Protean, which scares a lot of users, prompting some to even switch out flying types just because of the possibility of ice beam.