They weren't ordered to remove it, they were ordered to caption it if it's provided at all. They decided it's not worth it to provide it to everyone for free if they have to caption all their videos, so they are making it available to students only (presumably because they have compliant services available to students like interpreters for people going to the class in person).