Because more and more countries are ditching “flag carriers”, but why didn’t the US have a flag carrier?

Quite simply because it didn’t have to, they had Pan AM.

Pan American World Airways — Wikipedia

Pan American World Airways, originally founded as Pan American Airways and commonly known as Pan Am, was the principal and largest international air carrier and unofficial flag carrier of the United States from 1927 until its collapse on December 4, 1991. It was founded in 1927 as a scheduled air