I specifically avoided the Mazda CX-5 trim level that included a sunroof, because that would have reduced headroom by a few inches, risking me bonking my head if I hit a bump in the road.
Wife's Subaru Crosstrek has one, which she just uses to crack/vent when parked in the sun.
If you have a car with a sunroof, do you actually ever use it? Or is it one of those things that increase cost without increasing value?