Clarification of the Objection
It is reported in a hadith that the Prophet ﷺ once urinated while standing.
Since this is contrary to the dignity of prophethood, such hadiths are unacceptable.
Response to the Objection
First point
Urinating while standing is not prohibited anywhere in the Qur’an or the Sunnah.
Second point
The hadith itself also contains the reason for urinating while standing: there was rubbish and refuse there, and it was certainly a place where sitting was not possible, or where the likelihood of being touched by impurity while sitting was greater. Thus Ibn al-Qayyim (may Allah have mercy on him) says:
وَالصَّحِيحُ أَنَّهُ إِنَّمَا فَعَلَ ذَلِكَ تَنَزُّهًا وَبُعْدًا مِنْ إِصَابَةِ الْبَوْلِ، فَإِنَّهُ إِنَّمَا فَعَلَ هَذَا لَمَّا أَتَى سُبَاطَةَ قَوْمٍ – وَهُوَ مَلْقَى الْكُنَاسَةِ – وَتُسَمَّى الْمَزْبَلَةَ، وَهِيَ تَكُونُ مُرْتَفِعَةً، فَلَوْ بَالَ فِيهَا الرَّجُلُ قَاعِدًا لَارْتَدَّ عَلَيْهِ بَوْلُهُ، وَهُوَ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ اسْتَتَرَ بِهَا وَجَعَلَهَا بَيْنَهُ وَبَيْنَ الْحَائِطِ فَلَمْ يَكُنْ بَدٌّ مِنْ بَوْلِهِ قَائِمًا وَاللَّهُ أَعْلَمُ
Translation: The correct view is that the Prophet ﷺ did this in order to avoid and keep away from splashes of urine, when he came to the place where the people used to throw their rubbish and the like. It was a somewhat elevated place, such that if someone relieved himself there, drops of urine would come back towards the man. The Prophet ﷺ used to avoid splashes, so he ﷺ urinated between the wall and the rubbish heap, and standing was necessary in order to avoid impurity and splashes of urine.
Another reason
Another reason has also been mentioned: that it was because of an illness. Thus Imam al-Shafi’i (may Allah have mercy on him) says:
وَالْعَرَبُ تَسْتَشْفِي مِنْ وَجَعِ الصُّلْبِ بِالْبَوْلِ قَائِمًا
Translation: The Arabs would sometimes find relief from back pain by urinating while standing.
Summary
Whatever the reason, the jurists of Islam agree that one may urinate while standing because of an excuse, and this action of the Prophet ﷺ provides guidance for this permissibility.