The Prophet had already told people what to do on the day of Ghadeer. His real will was with Imam Ali. This letter was for those people to hear from the Prophet. However they accused him of hallucinating and therefore he kicked them out. He did not continue because they had already questioned his mind and he wanted to show that his last interaction with them was kicking them out.
The test for the Sahaba was not only the last minute. It was always. That was just one instance of it.
The prophet is a messenger he had to make sure the message has reached everyone and his role is to remind people. So obviously on his deathbed he wanted to remind them.
Even if he knew they will not accept, as a messenger he has a duty to deliver the message. That’s like saying a teacher knows the students will fail so he should not teach them.
The fact that they disobeyed causes disunity not the prophet.
Writing it down in their presence would have made it impossible for them to change the meaning or wording of the prophet.
Imam Ali was not in that group or even if he was, they began to quarrel in the presence of RasulAllah, they wouldn’t have cared for Imam Ali being present or not.
Imam Ali is the subject of the will. The prophet wanted those who he knows would cause fitna to listen to the will. If Imam ali tells them this is the will of the prophet and this is what he wanted they would reject him just as they did. There were other companions but they were overpowered by Umar. Abdulla Ibn abbas says he was present and he witnessed how the prophet was not allowed to write his will, hence he calls it a calamity.
It can also mean that the prophet was reiterating what he had already said.
In an oral culture things were not written down, even the Quran was initially just memorized and transferred orally, however the prophet had told them about Imam Ali on the day of Ghadeer and on the Thursday calamity, because his message was so important he asked for it to be written down?
What should strengthen the Sunni belief is that the Sahaba did not let the prophet say what he wanted to say, whatever it may be they were in the wrong for not allowing him to speak his mind and accuse him of being delirious.
As for appointing a successor, he clearly appointed imam ali on the day of Ghadeer. Whether he says it on his death bed or not is not an issue, he just wanted to reinforce what he had already told them. The prophets job is a reminder.
انما انت مذكر