A NSW bureaucrat has told a corruption inquiry it would have been critical to know then-treasurer Gladys Berejiklian was in a relationship with disgraced former Liberal MP Daryl Maguire at the time she was advocating for a multimillion-dollar grant in his electorate in 2016.