Can a ceramic coating prevent water spots on a car?
Quick answer: Ceramic coatings won't prevent water spots forming, but they do make removal easier. The hydrophobic surface causes water to bead and roll -- taking mineral deposits with it -- but hard water drying on the paint in sun can still leave spots.
Water spots form when hard water dries on your car, leaving behind minerals in the form of limescale. They are unsightly on their own, and they can also bind other contamination already sitting on the paint.
Because ceramic coatings are hydrophobic, water droplets will roll off your car -- but many more will sit on flat surfaces where they can form water spots. There is a slight irony in this: the tight, round beading that signals a working coating can actually concentrate mineral deposits, since each bead leaves its mineral content in one spot when it dries.
The good news is that the self-cleaning nature of ceramic coatings means your paintwork should have less other contamination on it for those minerals to bind with, and the slick nature of the coating means the deposits cannot permeate into the surface. If left, they can be mildly corrosive and should be cleaned as soon as possible with a dedicated water-spot remover.
Hard-water droplets leave calcium and salt behind, and on a hot panel those deposits can bake on and etch the clear coat. A good coating buys you time and makes removal easier, but it does not make the car immune. Prevention is best: avoid letting rinse water dry on the car, work in the shade, use filtered or de-ionised water if you can, and dry with a clean microfibre towel. If spots appear, act quickly -- fresh deposits usually lift with a safe wash and a water-spot remover. Older etched marks may need light machine polishing followed by re-protection.
For the broader "why have ceramic paint protection" answer, see What are the benefits of a ceramic coating?.