The efficiency of a piston compressor can (within reason) be made as high or as low as anyone would desire to make it.
There are practical reasons why some piston compressors have deliberate design features to limit the mechanical drive power requirement so as not to overload the drive motor.
If the compression ratio is kept deliberately low, that is the ratio of internal volume change at the extremes of piston motion, then the output pressure will be self limiting. As the output back pressure rises, flow will gradually reduce. That may sound very undesirable, until you have to spec a motor to drive the thing.
Which is better, a fairly flat drive horsepower curve with rising output pressure, or a very steeply rising power requirement with increasing output pressure? How easily is it able to start up against full applied back pressure?
Another way to limit drive power is with deliberate reduction of intake valve flow area. Very approximately mechanical drive power will be flow x back pressure. So if you can place some deliberately imposed limit on flow, once again the drive power requirement can be somewhat controlled. This feature can be very handy to keep the drive horsepower within an acceptable range if the operating Rpm is highly variable.
Which is better, an acceptably constant flow and drive torque over a wide operating Rpm range, or a steeply rising output flow and drive power requirement with operating Rpm ?
Now suppose you were given the task of designing a piston air conditioning compressor for a vehicle. It had to operate over at least a 10:1 Rpm speed range, and a vastly wide range of operating pressure.
You might be tempted to run a fairly large displacement compressor to get good performance at engine idle, and use the low compression ratio, and small valves trick to deliberately flatten the drive power requirement and even out the flow characteristics. This is in fact done to perfection.
In one respect these compressors are a hopelessly inefficient design. But they are designed to provide efficient cooling over a wide range of operating conditions, not be super efficient within themselves.
Likewise, commercial air compressors are usually designed to offer excellent and safe performance with a given drive motor. If you "hotted one up" by increasing the compression ratio, and porting the cylinder head (don't laugh!) would it be a better compressor if it then sometimes grossly overloaded the drive motor at certain times?
When I was a poverty stricken student, I used a belt driven twin piston refrigeration compressor as an air compressor at home. To start with I just could not get it to sufficiently load the drive motor, no matter how I changed the pulley drive ratio!
So I went to work on the cylinder head, and "hotted it up" a bit at a time. I still use that compressor, and it now loads the 7.5Hp electric motor beautifully.