Why do we sign an agreement to adhere to the United States Constitution, before teaching at the college level? In some parts of the US, why do we sign an agreement to adhere to the United States Constitution, before being hired to teach college level courses?

I asked the human resources lady about what happens if I don't sign the agreement, and she said I wouldn't be hired.

I don't think signing such an agreement is necessary to work in industry; so why is it necessary for employment in academia?
I had to sign a statement like yours in Colorado as well. As far as I know, all public employees -- including faculty -- have to sign it as a condition for being hired.

My best explanation for this is that it dates back to the 1950s when fear of communist subverters was strong in the United States (read up on Senator McCarthy, for example). The pledge was then meant as a reminder to new employees that their allegiance is with the country, not their personal ideology.

I don't think anyone is going to say that you "unqualified" if you don't sign the pledge. At the same time, I think it is not illegitimate for a country to require some sort of pledge to the constitution and shared values if you will be paid by tax payer money. You may not be asked to sign a pledge to the constitution if you work in industry, but you surely will have to sign all sorts of paperwork that assigns your inventions to the company, requires you to not say negative things about the company on social media, that you do not divulge company internals to outsiders or the press. So I think there is not all that much of a difference -- both employers ask you to keep in mind what is important to that employer.