Piston based tyre compressors have an advantage when you want higher pressures e.g. over about 1 atmosphere. Apart from that they tend to be less well made, less efficient, much higher in vibration owing to higher mass and need lubricating.
The diaphragm models weren't available until a few years ago, for lower pressure systems they're excellent at moving air about. They're also relatively safe, as they can't make high pressures, so you don't generally need to worry about safety valves, pressure relief.