It's clearly not undirected -- it's explicitly to fight in court the executive order as unconstitutional, which then applies to the entire US and not just their own tiny ecosystem.
Further, 3mil to their own drivers (which I haven't heard about but whatever) doesn't change US law -- so if their driver is booted out of the country, a few thousand dollars ain't much if you're thrown into a civil war or worse.
An analogy: a company has an oil spill, so they donate to Greenpeace.