Why do Freemasons take oaths?

New members make solemn promises concerning their behaviour both in the Lodge and in society. Members also promise to keep confidential the way they recognise each other when visiting another Lodge. Freemasons also promise to support others in time of need but only so far as it does not conflict with their family and public obligations.