German students are taught about the Holocaust for the same reason.
But what you might be referring to is this bizarre self-flagellation that has grown in popularity which focuses exclusively on the errors and ignores any of the good things about America.
My personal opinion is it’s because the people doing it want to remake America - throw away the old and create a “more just” society (obviously following their politics).
If you can use this self-criticism to destroy the foundation of America (through association) you can get rid of those pesky ideals preventing you from transforming society. Things like individual freedom, personal responsibility, inalienable rights, judging the individuals by their own actions and not the sins of their ancestors, etc.