I'd like to donate to help their cause. Does anyone know if it is legal for me to do so?

The laws around the world are different. The laws within countries are different. Without giving any indication where you are from, nobody can give you any information.

There is a FAQ page https://annas-archive.gl/faq#donate which for example gives you a Monero address which would mean completely anonymous donation.

You can also donate to Archive.today which seems pretty legit to donate to because they use Liberapay. Problem is that they are frequently banned and unbanned from liberapay and other fiat payment processors.

I would recommend getting into Monero so that you can make donations without permission.

Here is a HN discussion where I explained Monero and there was some good debate about it. (https://news.ycombinator.com/item?id=47841149)

https://liberapay.com/archiveis/donate

How about you buy some books from actual authors who actually wrote them?