In Malaysia, the sugar pagoda is a scared offering for local Chinese during the celebration to pray towards the Jade Emperor.
https://www.facebook.com/DaAi.Channel.Malaysia/videos/182029637044344