BUG: Playing Ajani, Nacatl Pariah twice under legends rule logs as a death and creates a planewalker
Legends rule is clear that removing two or more copies of a legend is not a death or sacrifice, it is simply discarding them into your graveyard (where not tokens).
However, today someone played a copy of Ajani, Nacatl Pariah on top of their other, created the cats, then the app recognized this as a cat dying, exiled Ajani and returned it as a planeswalker. This is incorrect and a bug.

-
Rezzahan#77802 commented
The legend rule applies to PERMANENTS, so cards and tokens on the battlefield, and a legendary creature that goes to the graveyard due to this dies, and thus triggers "dies" abilities". The legend rule is not a discard. The only thing wrong here is your "understanding" of the legend rule.
704.5j If two or more legendary PERMANENTS with the same name are controlled by the same player,
that player chooses one of them, and the rest are put into their owners’ graveyards. This is called
the “legend rule.”700.4. The term dies means “is put into a graveyard from the battlefield.”