بسم الله الرحمان الرحيم
What the questioner is referring to is a practice known as "
Istighaathah", which literally means "to seek help". According to Ahlus Sunnah wal-Jamaa`ah, it is Shirk and not permissible to do. However, there are certain deviated groups which do it, such as the Barelvis and the Ahbash (also known as the AICP). They present certain flawed arguments to substantiate their actions. However, even
Fitratan (innately), every Muslim knows that it is not permissible. The entire Qur'aan is permeated by the concept of Tawheed. There is no room for Shirk. In fact, Soorat-ul-Faatihah itself contains a refutation of
Istighaathah. We read:
إياك نعبد وإياك نستعين
{"You Alone do we worship, and from You Alone do we seek help."}
Now, those who have studied Arabic know that "
Iyyaaka" is used for emphasis, and to denote exclusiveness. So we are saying we worship
Only Allaah Ta`aalaa and seek help
Only from him. This Aayah is a clear refutation of the concept of
Istighaathah, and seeking help from those who have passed away.
As for why they do it, then the reasons are numerous, and all of those reasons are inspired unto them by Shaytaan, who wishes to take people away from Allaah Ta`aalaa. That is his primary goal. Some people make
Istighaathah while thinking that the dead will ask Allaah Ta`alaa on their behalf. Others make
Istighaathah while thinking that the Wali/Buzrug himself has been granted the power to answer the Du`aas of people. This is even worse than the other kind. All of this is
Shaytaaniyat. The primary reasons people do it is because of a lack of `Ilm, and because Shaytaan has misled them.
May Allaah Ta`aalaa protect all of us,
آمين يا رب العالمين
والسلام