I wish I could agree that Oracle are somehow acting in the interest of their shareholders but I fail to see how they benefit by spending hundreds of thousands on lawyers to try to protect a trademark that makes them zero revenue and on the whole damages their brand.
It intimidates anyone who might want to sue them for anything else. Being widely known for your scorched earth policy can be pretty effective. (Certain "we never settle" insurance companies do this too.)
There's no revenue stream, JavaScript is the colloquial term used to refer to ECMAScript, ain't nobody paying Oracle if they started trying to enforce it.