It's deeper than that. People here like Tesla because it's forcing other car makers to build decent electric cars. That's something that needs to happen if we're going to move away from fossil fuel dependence.
SpaceX is cool because there's a really good chance they'll be more successful at missions to the moon and Mars than NASA has been recently. They're both forward-thinking companies.
My point being there are thousands of companies doing interesting and "good" things. But Tesla and SpaceX definitely seem to get more of a positive reaction than the others.
Not saying they aren't doing good things. But they get more credit than the good things they're doing would merit. And probably more than even effective PR can explain.
Everyone, regardless of field, can relate to rockets and cars.
Far fewer people would relate to, say, optimizing insurance benefit payments.