IPC-497 (and other unamended sections, excluding added sections like 498A) were framed by Lord Thomas Babinton Macaulay. He had given justification for section 497 based on his own views on Hindu culture. He died in 1859. IPC became law in 1860.
To Siva:
Oruvan Oruthi is Christian law. Hindu males can have limitless number of wives, even much more than the 4 permitted for Muslims. Lord Krishna had 16008 wives. Lord Rama had only one wife. You know how he treated her. No woman would want such a loyal husband.
"Is there any such customes existed in the past for getting child etc... in olden days?."
Yes, Pandu was impotent. He had 5 sons from his wives Kunthi and Madri through Yama, Vayu, Indra and the Ashwini Devas. Kunthi had son Karna through Surya even before marriage.
Vichitraveerya son of King Shantanu and Satyavathi (fisherman's daughter) died leaving Ambika and Ambalika widows with no heirs to succeed him. Bhishma had given a vow to Sathyavathi's father that descendants of Sathyavathi only will be heirs to the throne. In order to fulfill that promise, Veda Vyasa, son of Sathyavathi (before her marriage to Shanthanu) was requested to have s*xual intercourse with Ambika and Ambalika. Thus Pandu and Dhritharashtra were born.
Is this enough or you want more.