On a car it also acts as a range extender and emergency backup (if you're out of battery and the car is engineered for, you can crawl along at the charge rate or wait a bit for a better charge). It's not great, but being to "walk" with your car might save your ass.
And if the car is designed around this idea (à la lightyear one), you can increase things further (the LY1 folks advertise a solar charge rate of up to 7.5mi/h WLTP with no A/C).
Solar panels in a remote location need to be converted from DC to AC for transmission, then transmitted long distances with associated losses, then converted to DC again to charge the car, stored in batteries in the car with associated losses. A solar roof could actually be a net gain assuming the energy is used while the car is in motion, and it’s used near the equator so no tilt required.
Sure, the government or the electricity company could just install car chargers and put a solar plant to power that in some rural area. But if I want something now then buying a car is much simpler than lobbying for that.
If Tesla offered a "Solar Panel Kit" that made their cars even a few percent more efficient it would sell like hot cakes.