The texts are not stenographical reports of what was said and done at the actual moment. They are probably based on real events and real sayings, but they were edited before collected into Nikayas and later written down.
Sometimes the Commentaries mention the editors, as for instance in the Therigatha Commentary: Imā tisso gāthā saṅgītikārehi ṭhapitā, "These three verses were added by the editors". Here, saṅgītikārehi refers to the editors.
When reading the Pali Texts, we should remember that they have been passing through the hands of editors, and we should also ask ourselves what motives the editors may have had for inserting passages or editing the text into the shape that has reached us.
We know that Ananda had an important position. He was the personal assistant of the Buddha, which means that he always had access to him, and, still more important, he could grant or bar access to the Master for others.
How did other monks react to this? Did some of them feel envy? Did some of them grasp the opportunity for revenge by inserting passages in the Mahaparinibbanasutta intending to blame Ananda for the death of the Buddha?
It is difficult to say for sure, ...
... but my personal feeling is that these passages may be the result of editors having a chip on their shoulder against Ananda.