Imam Ali (AS) was always with the Prophet (SAWA) and he witnessed how some persons led by Umar refused to obey the order of the Prophet (SAWA). Imam Ali (AS) knew their evil intentions when they openly opposed the Prophet (SAWA). The prophetic order to bring writing marerial was not to Imam Ali (AS) but to other companions. The Prophet (SAWA) wanted to write his last will appointing Imam Ali as his successor, and that was the reason of the refusal of Umar and his group to obey the Prophet (SAWA). If he brought it, they will simply deny it and deny the Prophet's other orders and turn against Islam to achieve their evil plans to grasp the government. They have already said about the Prophet (SAWA): the (man) is speaking nonsense إن الرجل ليهجر.
Imam Ali (AS) was always trying to protect Islam and Muslims and never let them fight or leave Islam.