They make it so because there's excess capacity at night, when most everyone is asleep. This is not an arbitrary decision.
>Ideally cars should charge when the sun is up, in day time
That's not even remotely true. Someday MAYBE, if massive solar deployment shifts our excess capacity from night to daytime, but that's certainly not the case right now.
Ideally cars should charge during times when energy is cheaper. This could be at times of lower consumer demand, like at night or at times when prices are cheaper because variable and barely off at all controllable renewables are dumping power into the grid, like when it’s especially sunny or windy.
Which suggests favoring the time based on whatever the "grid-time-bias" has cheaper.
Power's cheaper at night because demand's lower. The sun being out during daytime does make more solar power available, but there's also higher demand because everyone's awake. Unless there's evidence to the contrary, I'm inclined to believe that night power is cheaper because of pure market forces, rather than being dictated by the power company.
And even if so driverless cars won't give them any other business, as well as drastically alter the desired locations of the stations.