Shaykh ʿAli al-Qari states in al-Mirqat (2/372), clarifying the reason for the prohibition: “It involves such excessive veneration that the object is treated as though it were on the level of a deity. If that veneration were truly directed to the grave itself or to the person buried therein, the one showing it would be guilty of disbelief. Even imitating such conduct is reprehensible and should, in fact, be deemed unlawful. The same ruling applies—indeed, even more so—to a bier that is set down (meaning: in the worshippers’ direction of prayer). The people of Mecca have been tried by this practice, for they place the bier beside the Kaʿbah and then turn toward it in prayer.”
I say: He is referring to the obligatory prayer, and this widespread affliction has now extended beyond that context.