Surely a company should be governed by the laws of the state in which they are based
This is not true and wouldn't make why sense: let's say you are a delivery company and one of your drivers runs over a dog in Texas. The lawsuit can be filed in Texas, regardless of whether your company is in Texas, California, or even outside the united states. The place you are incorporated in doesn't change the damages or laws you violated when running over the dog. Of course you can also move the venue to the state the company is based in.
You cannot (generally) move it to another state, since that state doesn't even have jurisdiction over any part of the incident.
The internet is just special in the sense that really something that happened on the internet happened everywhere on earth at the same time, meaning any venue is a place where potential damages were accrued.
The issue with the internet is that it did take place in texas as well: The news article was available in texas, so the news corp can be sued there. Basically the argument is: "Media Matters harmed X's brand in texas using misleading information" (you can read their arguments for filing in texas under the "Jurisdiction and Venue" section of their filing).
Also remember that this is currently X's wish list: Media Matters can file for a change in venue.
Edit: Quick update.
Looking at their filing, the case will probably fail under a motion for summary judgment: They basically agree with Media Matters that they did show ads under extremist's posts. They simply argue that you need to push the twitter algorithm to its limits by doomscrolling for a long time until the algorithm fails. However, this doesn't make any of the facts provided by Media Matters (https://www.mediamatters.org/twitter/musk-endorses-antisemitic-conspiracy-theory-x-has-been-placing-ads-apple-bravo-ibm-oracle) wrong.