This was a common practice in the ancient Near East. It was against the law of Moses. The men of Israel would have sinned if they married more than one woman. This type of marriage always creates problems because of jealousy. (See: [[rc://en/tw/dict/bible/kt/lawofmoses]] and [[rc://en/tw/dict/bible/kt/sin]] and [[rc://en/tw/dict/bible/kt/jealous]])
It was customary for Israelites to promise God to make a sacrifice to him if God answered special prayers. Making such a sacrifice was called paying one's vow. (See: [[rc://en/tw/dict/bible/kt/vow]])
When Hannah wanted to assure Eli she was telling the truth, she used the idiom "as you live." This is a type of oath formula meaning "I promise you I am telling the truth." (See: [[rc://en/ta/man/jit/figs-idiom]])