Look at these Muslim men doing dramas of decency by not shaking hands with women.

On one side Islam made life difficult for a woman in name of “Hijab and Decency حياء”, and practically imprisoned her in her home, and cut her off from the outside world, she could not even talk with other men, and even if she has to talk, then she must talk in a hard voice.

But on the other hand:

  • Prophet Muhammad also prohibited slave women from wearing the Hijab and even their breasts were kept naked in public (link). 
  • And it was also allowed to touch their body parts. 
  • Prophet Muhammad himself used to walk in public while holding the hands of the slave girls of another man in his hand.

Sahih Bukhari, Hadith 6072:

Anas bin Malik said, "Any of the female slaves of Medina could take hold of the hand of Allah's Apostle and take him wherever she wished."

Please remember that this slave girl was there with naked breasts too, which makes things more complicated.

Why did prophet Muhammad need to take her hand in his hand? Why were they not able to move in the city without taking each other’s hands?

This same tradition is also present in Sunan Ibn Majah too.

Sunan Ibn Majah, Hadith 4177:
“If a female slave among the people of Al-Medinah were to take the hand of the Messenger of Allah, he would not take his hand away from hers until she had taken him wherever she wanted in Al-Medinah so that her needs may be met.”
Grade: Sahih (Darussalam)
Grad: Sahih (Albani)

Why are these two opposite extremes?

On one side, not only hairs but the whole body of a free woman is imprisoned in Jilbab. Or even worse, she is practically imprisoned in the 4 walls of the house. She is compelled to lead an unnatural life, where she is not even allowed to talk with men. 

But on the other side, even the breasts of the slave women were kept naked. And even customers could touch their private parts like sheep and cattle. And Muhammad was moving while holding the hands of the slave women of other people. 

Yes, these are the two opposite extremes.

This happens when no Allah is present above in the heavens, and a human with the intellect level of Muhammad had to make the revelations on his own.

Excuse by Islamic Preachers: Holding hands is only figurative

Islam QA website presented this excuse (link):

They did not interpret the taking of his hand that is mentioned in this hadith in terms of the apparent meaning of holding his hand. This is a well-known figure of speech in Arabic, as in the supplication “Allahumma khudh bi aydina ilayka” (lit. “O Allah, take us by the hand and lead us to You (your path)”), which means: Enable us to submit to You – because when someone takes you by the hand, you have submitted to him.

Answer: The "context" of Hadith in Bukhari is itself clear enough that it was not a metaphor, but it was used in its apparent meaning of holding hands, while Muhammad was "physically present", and both of them were physically moving in Medina. 

While in the supplication, the context makes it a metaphor, while Allah is "physically absent", and the path towards him is also "physically absent".