Yes, they can upload copyrighted stuff, but people typically don’t do so on large scale and when they knowingly do it these days they typically try to hide their tracks well enough that law firms know it will not be a lucrative business to try and blackmail them.
And one of Codeberg’s main points is the unknown copyright status, you just failed to understand it.