It's for a rich elite to indulge in a pastime far out of the reach of normal working-class people, or for big manufacturers to market themselves. Nothing about motorsport is cheap, nothing about it is simple or basic. Football, tennis and the like are popular because anyone can feel a connection to what they see - they could go out and buy a ball or some rackets and emulate what they see professionals doing.
Difficult accessibility to participate doesn't equal difficult to watch.
Also racing video games are pretty much the emulation for casual viewers, they don't care if it is Arcade, Sim or Simcade, they'll say they are epic racers just because they are the best at Need for Speed.
I very much doubt Tennis is any popular than any big national motorsport, maybe in England but here in Australia hardly anyone cares unless the Australian Open is mentioned.
Also all your things come to is comparisons, not just its overall appeal. Doesn't mean its exclusive or small, it just means not as big as others.
I'm not sure how much everyday media exposure Supercars gets in Australia, but be honest, do you really see it taking top billing in the sports news over football or rugby?
That is hard to say, while hardly anyone gives 🤬 about ordinary football. AFL and Rugby are different depending on the state, one is really massive while the other is meh but VA Supercars always has consistent popularity in the country.
In fact, except Soccer, Motorsport is probably the biggest sport consistently thanks to various series able to support it.
Baseball: Only Americans and Japanese care.
Cricket & Rugby: Oceania and Europe only mostly.
Basketball: I never hear about Basketball that isn't NBA (which is American) and even then it isn't that big. Even our NBL is poor.
Ice Hockey: Canada and America.
AFL: Pretty much Australian only.
Motorsport: Thanks to different series that reach out to different audiences, pretty much all continents have a big motorsport that while isn't the biggest compared to the other sports, it is still there and it does draw crowds and ratings, if it was so small and exclusive then I doubt they would have the funds to keep running them.