maṅgalārtham . māṅgalikaḥ ācāryaḥ mahataḥ śāstraughasya maṅgalārtham siddhaśabdam āditaḥ prayuṅkte . maṅgalādīni hi śāstrāṇi prathante vīrapuruṣakāṇi ca bhavanti āyuṣmatpuruṣakāṇi ca . adhyetāraḥ ca siddhārthāḥ yathā syuḥ iti . (I.6.26 - 7.2)
For the sake of good luck (maṅgala). A superstitious (māṅgalika) teacher begins his great, extensive treatise with the word "siddhaṁ" to bring good luck. For treatises with a lucky beginnings spread (far and wide) and produce men who are heroic (vīra) and long lived (āyusmat). And those who study [that treatise] will accordingly achieve their goals (siddhārtha).This suggests that the practice dates from much earlier than the period associated with the Siddhaṃ script. In a Buddhist context the Buddha is said to have been critical of those who were māṅgalika, but was not beyond making accommodations with the customs of superstitious lay people. See my essay Gesundheit! Making Accommodations with Custom.