It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) came out of the toilet (after relieving himself), and food was brought to him. The Companions said, "Shall we bring water for you to perform ablution?" The Prophet (peace and blessings be upon him) said: "Indeed, I have been commanded to perform ablution only when I stand for prayer." In the narration of Duraqi, the word « للصلاة » is used instead of « الي الصلاة ». (The meaning is the same.)
Related hadith on this topic