a large part of why nunneries and convents exist is to give women a safe haven from men.
Also to get rid of unwanted/illegitimate/“misbehaving” daughters, sisters other relatives.