In videos from Karbala, I have seen people touching the Alam of Maula Abbas a.s. and waving the cradle of Hazrat Ali Asghar a.s.
They, then wiped their faces with those hands. Could you please help me with understanding why all of this is done? Is there any logic behind it?
Also, I have seen the same practice in India prevalent among the kufr in mandirs of Krishna and the people of ahlul Sunnah accuse us of the same shirk (nauzubillah).

There is no logic that can necessarily explain this behavior. Instead, consider how someone holds the picture or article of clothing of their deceased relative or kisses it. This gesture just signifies how important that symbol of the relative is to them. In the same way people associate the flag with the holy people and by it, a form of emotional blessing (hence the wiping). They are not worshiping it, it is just a symbol