Why add acid to rid of soluble carbonate or hydroxide impurities? Will it not also react with halide I'm testing for
Hydrogen halides are strong acids, meaning that their conjugate bases $\ce{X-}$ are extremely weak. Thus, adding $\ce{H+}$ will neutralize stronger bases such as $\ce{OH-}$ first before $\ce{X-}$.