Foreign Income Exclusion & Tax Rate

I've been able to successfully exclude the income I earned through 6 months of working abroad in 2021. However, while the income was excluded my federal taxes increased. Why is my income being taxed higher if I was able to successfully exclude all of my foreign income earned in 2021? I should note that I worked in the States for the last 6 months in the USA and have a W2. My tax rate on what I earned in the USA increased when I included my foreign income even though it was all excluded.