Ruling on customs and traditions that go against sharee’ah or cause embarrassment
Question

 
There is a tradition some people observe during funerals. When someone who relates to two villages dies, they do the funeral then visit the relatives of the dead person. Then they quickly return to their village without any delay, they do not accept to stay at the relatives for hospitality because they think they it is not permissible for them to delay returning in this occasion.
Note that all of them in the two villages Muslims, most or all of them follow the Hanafi School of thought. They all hold same nationality and they may have womb relations.
My question is: has this habit any basis in Islam? I hope you give me a detailed full answer. Because this habit sometimes causes embarrassment and other social problems.
Praise be to Allah.There is nothing in sharee’ah that points to the customs you mention in your question. It seems that these are things that people have become accustomed to in their lives and they do not attribute them to religion. It also seems that they have to do with psychological and social matters. 
Whatever the case, since these customs have no basis in sharee’ah and especially since you mention in your question that the hospitality asked about is not offered by the family of the deceased, which is what is not allowed, then the people should not regard this as a sacred law that cannot be changed or altered. That is because this custom represents a shortcoming – of whatever extent – in the upholding of family ties and visiting family and brothers. There is no real reason for falling short in upholding these ties, especially since the problem may be caused when the family’s relatives come to the village without coming to  visit them. That may be a reason for the resentment and suspicion. 
Customs and traditions that clearly go against sharee’ah, or which go against the general aims of sharee’ah, or which may lead to misunderstandings and shortcomings, should be shunned and efforts should be made to change them, which needs some wisdom and gentleness. 
Shaykh al-Sa’di (may Allah have mercy on him) said in Risaalah fi Usool al-Fiqh (7): 
The basic principle with regard to customs is that they are permissible, unless it is narrated in sharee’ah that they are forbidden. 
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him) said in Majmoo’ al-Fatawa (6/510): 
What every Muslim must do is not accept customs blindly, rather he should measure them against sharee’ah. Whatever is approved of is permissible for him to do, otherwise he should not do it. The fact that people are accustomed to something is not evidence that it is permissible. All the customs that people are used to in their lands or tribes must be measured against the Book of Allah and the Sunnah of His Messenger (peace and blessings of Allah be upon him). Whatever Allah and His Messenger have permitted is permissible, and whatever Allah has forbidden must be abandoned, even if it is the people’s custom. End quote. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said in Tafseer Soorat al-Baqarah 2 (299): 
Tradition does not make something that is not prescribed permissible, because Allah says (interpretation of the meaning): “It is not Al‑Birr (piety, righteousness) that you enter the houses from the back” [al-Baqarah 2:189], even though that was their custom and they regarded it as righteousness. The one who takes something as a custom and regards it as righteousness has to measure it against the laws of Allah. End quote. 
The scholars regarded adherence to customs and traditions that cause hardship for people and lead to some evil consequences or hardship and disputes and difficulty as blameworthy extremism, and as the kind of affectation and going to extremes that is forbidden in Islam. 
It was narrated from ‘Abd-Allah ibn Mas’ood (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: 
“Those who go to extremes are doomed.” He said it three times. Narrated by Muslim (2670). 
Al-Nawawi (may Allah have mercy on him) said in Sharh Muslim (16/220): 
i.e., those who go to extremes and exaggerate in their words and deeds. End quote. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said, speaking of different types of extremism in Majmoo’ al-Fatawa (7/7): 
The fourth category is going to extremes in customs, which is adhering too strongly to ancient customs and not turning to that which is better than that. But if the customs are equal to others in serving a valid purpose, then adhering to one’s own customs is better than turning to foreign customs. End quote. 
And Allah knows best.