You ever try to drag a compressor with you on a bike?
Motorbike, yes. Pedal bike, no.
On a pedal bike I carry a hand pump. Lightweight, it doesn't run out of energy until I do, and a hand pump doesn't take too long on small bicycle tires.
There are some small self-contained electric compressors available nowadays with rechargeable onboard lithium batteries. Some folks on touring motorcycles and cars carry these because they save a bit of time and hassle over plugging in a compressor powered by the car. They're also more convenient for checking and setting tire pressure more frequently.
People heading into extremely remote areas on dual-sport motorcycles sometimes carry a bicycle hand pump as a backup. It will take a good long while, but you can get the job done if an electric pump fails. They're very light weight and don't take up much room at all strapped to the frame somewhere.