Those failures to live up to those ideals define the reality of American history more than the ideals themselves.
“Anyone” couldn’t, and can’t be an American. In fact, years of legal precedence and brutal, systemic violence pretty clearly defined who was excluded. (Hint: non-white people). Only relatively recently when injected with modern forms of humanism and challenged by (gasp) leftist activism of minorities has this statement even remotely rang true.
Also, the Founding documents don’t have some essential human truth buried in them for all mankind, they are documents of their time with specific, traceable ideological currents. They’ve worked better than other ideologies recently, but such a broad claim dips into some kind of patriotic mysticism.