Former CFMEU administrator Mark Irving KC has told an inquiry the union protected its members by engaging with companies linked to organised crime.