Sarah is often criticised for giving her maidservant to Abraham to bear his child (strange enough, Leah and Rachel are never criticised for doing essentially the same), yet what she did was fully in accordance to the laws of the region they had originally inhabited.
The ancient Mesopotamian society was chiefly monogamous, yet the exception was allowed when the wife couldn't bear children. In this situation, she could give her husband a maid whose children were then considered as belonging to the lawful wife, while the maid was considered only as his mistress and could be degraded back to slavery for bad behaviour (kinda of what happened to Hagar), though she couldn't be sold.
If the wife refused to do it, her husband could take a concubine who was a free woman with full rights and would be considered as equal in status to the first wife, so it's quite obvious that Sarah's choice appeared logical to both her and her husband.
If you want to know more about Babylonian laws, click here.