Why are Shubh and Labh written on walls in Indian culture?

Ganesha is the god of Wisdom and is represented by the Swatik. The two lines on each sides represent his wives Riddhi and Siddhi.


The Siva Purana has a story in which Ganesha and his brother Skanda compete for the right to marry the two desirable daughters of Prajapati, Siddhi and Buddhi, and Ganesha wins through a clever approach. This story adds that after some time Ganesha begat two sons: Kshema  (Prosperity), born to Siddhi, and Labha (Acquisition, Profit) born to Buddhi.



 In Northern Indian variants of this story the sons are often said to be Subha (Hindi Shubh) (auspiciousness) and Labha. 



In discussing the Shiva Purana version, Courtright comments that while Ganesha is sometimes depicted as sitting between these two feminine deities, "these women are more like feminine emanations of his androgynous nature, Shaktis rather than spouses having their own characters and spouses."



So when Gaṇeśa is present, siddhi 'success' and buddhi 'wisdom' are not far behind.