Understanding magnetic fields in circumgalactic gas