(IANAL) It doesn't matter if people think RIAA's DMCA isn't legally valid (or even if it isn't actually valid), Github still has to follow section 512 of the DMCA as a service provider, and it's not their responsibility to determine validity of the claim. RIAA is a 3rd party authorized to act on behalf of the copyright holder, so they are allowed to send a DMCA takedown. Also the takedown is claiming DMCA section 1201, which is for bypassing DRM, not distributing infringing material.
tl;dr there probably isn't anything inherently wrong with the RIAA's claim, and there's definitely nothing wrong with github's response.
As for DMCAing an oil producer's repository for something unrelated to DMCA, github would still take it down, but it's quite likely that you'd end up with a lawsuit from the oil company for damages. As long as GitHub is run by a US company, it doesn't matter how advocating they are of open source, nothing would change...they'd still take down the repository after receiving a DMCA takedown request.
And the last point, my understanding is apple wasn't actually required to assist the FBI, but american companies are required to follow DMCA.